读书人

firefox中无法取得clientWidth和clien

发布时间: 2012-02-09 18:22:27 作者: rapoo

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

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

[解决办法]
直接取Width和Height呢?odyp.width

读书人网 >JavaScript

热点推荐