您现在的位置是:首页 > 电脑技术查询 > web开发

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

编辑:chaxungu时间:2022-10-02 23:22:00分类:web开发

firefox中无法取得clientWidth和clientHeight的值
var odyp = document.getElementById( 'dypopLayer ');
var popWidth = odyp.clientWidth;
var popHeight = odyp.clientHeight;

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

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