摘要: jQuery中stop()与clearQueue()用法与区别 //stop() >onle for animate$(selector).stop(stopAll,gotoEnd)默认参数都为falsesotpAll:是否停至所有动画,false指仅停至当前动画,排队动画继续执行,true指停止当 阅读全文
posted @ 2017-09-15 10:34 梦溪回 阅读(221) 评论(0) 推荐(0) 编辑
摘要: //$(selector).click(function(){}) <html><head><script type="text/javascript" src="/jquery/jquery.js"></script><script type="text/javascript">$(documen 阅读全文
posted @ 2017-09-15 10:09 梦溪回 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 先放这,还没完全弄懂,今晚来补 http://www.ruanyifeng.com/blog/2009/08/learning_javascript_closures.html 阅读全文
posted @ 2017-09-07 10:52 梦溪回 阅读(62) 评论(0) 推荐(0) 编辑
摘要: 1.trim() trim() 函数返回去掉开头和结尾空格后的字符串。 return arr.filter(function(ele){ if(ele==1){ return false; } if(ele==2){ return true; } for(var i=2;i<=(ele/2);i++ 阅读全文
posted @ 2017-09-06 17:03 梦溪回 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 1.exex是正则表达式的方法,而不是字符串的方法,它的参数是字符串 res=/\d/.exec(str); match是字符串提供的方法,它的参数是正则表达式 res=str.match(/\d/); 2.exec和match返回的都是数组。 如果执行exec方法的正则表达式没有分组(没有用括号括 阅读全文
posted @ 2017-09-06 10:31 梦溪回 阅读(867) 评论(5) 推荐(0) 编辑