2017年2月10日

摘要: document.oncontextmenu=function(e){ return false; } //鼠标右键事件 阅读全文
posted @ 2017-02-10 16:28 雪梨laxe 阅读(121) 评论(0) 推荐(0)

2017年2月9日

摘要: $(document).scroll(function(){ if($(document).scrollTop()>=$(document).height()-$(window).height()){ //滑到底部操作 } }); //alert($(document).height());获取文档 阅读全文
posted @ 2017-02-09 11:53 雪梨laxe 阅读(146) 评论(0) 推荐(0)

2016年10月26日

摘要: //获取@和.之间的字符 var str1 = "laxe@ll.com"; var str2 = str1.substring(str1.indexOf('@')+1,str1.indexOf('.')); alert(str2);//弹出 ll substring(start,end);//st 阅读全文
posted @ 2016-10-26 10:16 雪梨laxe 阅读(1068) 评论(0) 推荐(0)

2016年10月24日

摘要: substr(star[,length]);//star起始位置 length截取的长度 substring(star,end);//star起始位置,end结束位置 都是以0开始的索引值 阅读全文
posted @ 2016-10-24 17:00 雪梨laxe 阅读(570) 评论(0) 推荐(0)
 
摘要: var key = ‘java’; var str = "hello,javascript,welcome to my world"; if(key.indexOf(str)!=-1){ alert('Yes'); } 阅读全文
posted @ 2016-10-24 16:30 雪梨laxe 阅读(774) 评论(0) 推荐(0)
 
摘要: 阅读全文
posted @ 2016-10-24 15:49 雪梨laxe 阅读(138) 评论(0) 推荐(0)