IE与FireFox的兼容性问题(JoeCom整理--未完待续)
2007-10-02 09:54
281 查看
IE与FireFox的兼容性问题(JoeCom整理--未完待续)
window.event
IE:有window.event对象
FF:没有window.event对象。可以通过给函数的参数传递event对象。如onmousemove=doMouseMove(event)
鼠标当前坐标
IE:event.x和event.y。
FF:event.pageX和event.pageY。
通用:两者都有event.clientX和event.clientY属性。
鼠标当前坐标(加上滚动条滚过的距离)
IE:event.offsetX和event.offsetY。
FF:event.layerX和event.layerY。
标签的x和y的坐标位置:style.posLeft 和 style.posTop
IE:有。
FF:没有。
通用:object.offsetLeft 和 object.offsetTop。
窗体的高度和宽度
IE:document.body.offsetWidth和document.body.offsetHeight。注意:此时页面一定要有body标签。
FF:window.innerWidth和window.innerHegiht,以及document.documentElement.clientWidth和document.documentElement.clientHeight。
通用:document.body.clientWidth和document.body.clientHeight。
window.event
IE:有window.event对象
FF:没有window.event对象。可以通过给函数的参数传递event对象。如onmousemove=doMouseMove(event)
鼠标当前坐标
IE:event.x和event.y。
FF:event.pageX和event.pageY。
通用:两者都有event.clientX和event.clientY属性。
鼠标当前坐标(加上滚动条滚过的距离)
IE:event.offsetX和event.offsetY。
FF:event.layerX和event.layerY。
标签的x和y的坐标位置:style.posLeft 和 style.posTop
IE:有。
FF:没有。
通用:object.offsetLeft 和 object.offsetTop。
窗体的高度和宽度
IE:document.body.offsetWidth和document.body.offsetHeight。注意:此时页面一定要有body标签。
FF:window.innerWidth和window.innerHegiht,以及document.documentElement.clientWidth和document.documentElement.clientHeight。
通用:document.body.clientWidth和document.body.clientHeight。
相关文章推荐
- Firefox,Safari与IE兼容性问题整理
- IE与FireFox的兼容性问题及解决 (zt)
- IE与FireFox的兼容性问题分析
- IE和Firefox在JavaScript方面的兼容性问题
- [转]IE和Firefox兼容性问题及解决方法
- CSS浏览器兼容问题整理(IE6.0、IE7.0+ 与 FireFox)(三)
- IE & Firefox 兼容性问题 JS和对象问题 2
- jsonStore在firefox和ie中兼容性问题
- IE与Firefox的CSS兼容问题整理
- Extjs显示时间兼容性问题——firefox正常显示,IE不正常出现NaN-NaN-NaN的解决方式
- Javascript代码在浏览器IE和Firefox兼容性的16个问题
- javascript在IE和Firefox中兼容性问题
- javascript在IE和Firefox中兼容性问题
- CSS对浏览器的兼容性(IE和Firefox)技巧整理
- 浏览器兼容问题汇总整理 ie,chrome,firefox...
- CSS浏览器兼容问题整理(IE6.0、IE7.0+ 与 FireFox)
- Javascript在IE和Firefox浏览器常见兼容性问题总结
- Javascript的IE和Firefox兼容性问题
- Firefox和IE兼容性问题及解决方法总结
- CSS浏览器兼容问题整理(IE6.0、IE7.0+ 与 FireFox)(四)