ie6 offsetWidth/offsetHeight无效
生活随笔
收集整理的這篇文章主要介紹了
ie6 offsetWidth/offsetHeight无效
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
ie6 offsetWidth/offsetHeight無效
可采用手動獲取:
offsetWidth=parseInt(node.style.width)+parseInt(node.style.paddingLeft)+parseInt(node.style.paddingRight);
offsetHeight=parseInt(node.style.height)+parseInt(node.style.paddingTop)+parseInt(node.style.paddingBottom);
如果有邊框的話可以繼續加上對應兩邊的邊框。
?
開發js組織結構圖過程中發現此問題,網上找了許久也沒得到準確答案,最終在回家途中幡然醒悟。
特此公布在網上,給大家一個解決的方法。
?
總結
以上是生活随笔為你收集整理的ie6 offsetWidth/offsetHeight无效的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 视易linux进图形界面,视易KTV点歌
- 下一篇: ubuntu20.05安装vmware