05 2014 档案

摘要:$(function(){ var a=new Date().getTime();// 实时加载,目的是清除缓存 $("head").append('')}) 阅读全文
posted @ 2014-05-26 10:56 hlp鹏 阅读(356) 评论(0) 推荐(0) 编辑
摘要:// 获取字符串的字节长度 function len(s) { s = String(s); return s.length + (s.match(/[^\x00-\xff]/g) || "").length;// 加上匹配到的全角字符长度 } function limit(... 阅读全文
posted @ 2014-05-21 11:15 hlp鹏 阅读(1538) 评论(0) 推荐(0) 编辑
摘要:jquery动态事件绑定,父元素需为静态元素,(不能是动态生成);$("#parent").on("click","#child",function(){//....}); 阅读全文
posted @ 2014-05-12 19:24 hlp鹏 阅读(119) 评论(0) 推荐(0) 编辑
摘要:1.图片自动等比例缩放{display:block;width:100%; height:auto;} 阅读全文
posted @ 2014-05-12 19:22 hlp鹏 阅读(131) 评论(0) 推荐(0) 编辑
摘要:一:数组复制//方法一//slice()函数将会返回一个新的数组对象 var arr = [1,2,3,4]; var clone = arr.slice(0); arr.splice(1,2);//删除从位置1开始的两个元素 console.log("arr:" + arr + "\nc... 阅读全文
posted @ 2014-05-04 10:31 hlp鹏 阅读(101) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示