摘要: function create(){ return parseInt(Math.random() * 100) } window.setInterval(function () { console.log(create()); },2000) 阅读全文
posted @ 2018-02-01 23:58 goodman8 阅读(322) 评论(0) 推荐(0) 编辑
摘要: var str='我我我abc';var bytesCount = 0;for (var i = 0; i < str.length; i++){ var c = str.charAt(i); if (/^[\u0000-\u00ff]$/.test(c)) //匹配单字节 { bytesCount 阅读全文
posted @ 2018-02-01 23:57 goodman8 阅读(355) 评论(0) 推荐(0) 编辑
摘要: var self = document.getElementsByTagName("a");for(var i=0;i<self.length;i++){ self[i].onclick = (function(i){ return function(){ alert(i); } })(i)} <a 阅读全文
posted @ 2018-02-01 23:56 goodman8 阅读(353) 评论(0) 推荐(0) 编辑
摘要: 1、圆角2、边框3、背景4、阴影5、渐变 background: linear-gradient(blue,red,yellow); 6、2D效果: 旋转 transform: rotate(230deg) 移动 transform: translate(50px,100px) 缩放 transfo 阅读全文
posted @ 2018-02-01 21:08 goodman8 阅读(253) 评论(0) 推荐(0) 编辑