当前位置: 代码迷 >> JavaScript >> firefox中无法取得clientWidth和clientHeight的值解决办法
  详细解决方案

firefox中无法取得clientWidth和clientHeight的值解决办法

热度:1688   发布时间:2012-02-09 18:22:27.0
firefox中无法取得clientWidth和clientHeight的值
var   odyp   =   document.getElementById( 'dypopLayer ');
var   popWidth   =   odyp.clientWidth;
var   popHeight   =   odyp.clientHeight;  

在IE中,可以获得popWidth,popHeight的值,可是在firefox中就不能获取了。
该怎么办呢?

------解决方案--------------------
直接取Width和Height呢?odyp.width
  相关解决方案