摘要: 页面具有 DTD,或者说指定了 DOCTYPE 时,使用 document.documentElement。页面不具有 DTD,或者说没有指定了 DOCTYPE,时,使用 document.body。在 IE 和 Firefox 中均是如此。这个是兼容的方法: function ScollPostion() {//滚动条位置 var t, l, w, h; if (document.documentElement && document.documentElement.scrollTop) { t = document.documentEle... 阅读全文
posted @ 2013-11-26 17:42 stevejson 阅读(3622) 评论(0) 推荐(0) 编辑