摘要: 事件绑定及深入 多个window.onload一起执行 如何让执行两个window.onloadwindow.onload=function(){ alert('Lee');} if(typeof window.onload=='function'){ var saved=null; //保存上一个 阅读全文
posted @ 2017-08-23 18:34 耿鑫 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 事件冒泡和捕获window.onload=function(){ document.onclick=function(){ alert('document'); }; document.documentElement.onclick=function(){ alert('html'); } docu 阅读全文
posted @ 2017-08-23 15:31 耿鑫 阅读(90) 评论(0) 推荐(0) 编辑
摘要: ondblclick: 双击 onmousedown: 当用户按下了鼠标还未弹起时触发。 onmouseup: 当用户释放鼠标按钮时触发。 onmouseover: 当鼠标移到某个元素上方时触发。 onmouseout: 当鼠标移出某个元素上方时触发。 onmousemove: 当鼠标指针在元素上移 阅读全文
posted @ 2017-08-23 15:17 耿鑫 阅读(122) 评论(0) 推荐(0) 编辑
摘要: JavaScript有三种事件模型:内联模型、脚本模型和DOM2模型。 内联模型,onclick是事件处理函数<input type="button" value="按钮" onclick="alert('Lee');"><input type="button" value="按钮" onclick 阅读全文
posted @ 2017-08-23 10:29 耿鑫 阅读(108) 评论(0) 推荐(0) 编辑