03 2009 档案

摘要:FireFox : addEventListener()方法 IE : attachEvent()方法 为HTML元素添加一个事件监听, 而不是直接对元素的事件属性(如:onclick、onmouseover)赋值。 这两种方法处理事件还是有很大区别的!事件属性只能赋值一种方法,即: button1.onclick = function() { alert(1); }; button1.onc... 阅读全文
posted @ 2009-03-25 09:18 Devbar
摘要:var obj1=document.getElementById("myframe"); alert(obj1.src); //取标签属性 alert(obj1.contentWindow); //取相关联的 window 窗口对象 阅读全文
posted @ 2009-03-16 10:39 Devbar 阅读(224) 评论(0) 推荐(0)
摘要:function getWindowSize(){ return { Width:Math.max(document.body.scrollWidth,document.documentElement.clientWidth), Height:Math.max(document.body.scrollHeight,docume... 阅读全文
posted @ 2009-03-16 09:43 Devbar 阅读(491) 评论(0) 推荐(0)