摘要: 1.原声js与借用jquery输出来的事件列表却不一样 function touchPlay(e){ e.preventDefault(); console.log(e);}var screen = document.getElementById("screen");screen.addEventListener("touchstart", touchPlay, null);screen.addEventListener("touchmove", touchPlay, null);输出: $(function(){ $("# 阅读全文
posted @ 2013-11-19 10:33 淡墨素然 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 平常编写代码,更改一个元素样式的时候,自己都是用 obj.style.width = "200px"; obj.style.position = "absolute"; obj.style.left = "100px"; 之类的代码进行设置,这样的话如果更改样式很多的时候,就要写很多代码,难道不能像Jquery那样使用$(obj).css(……);这样进行设置么? 阅读全文
posted @ 2013-02-26 11:36 淡墨素然 阅读(12971) 评论(5) 推荐(0) 编辑
摘要: Math.random(),Math.floor(),Math.ceil(),Math.round() 阅读全文
posted @ 2013-02-02 10:26 淡墨素然 阅读(1112) 评论(0) 推荐(0) 编辑