这段JS为什么能在FireFox运行,但是不能再IE6中运行? 本帖最后由 zhaizhaoxuan 于 2010-01-14 14:00:58 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 document.documentElement.clientWidth或许应该改成document.body.clientWidth或者parseInt(document.body.clientWidth) 试试看L@_@Kfunction $(obj){ return document.getElementById(obj);}function ChangeWin(){ var W = (document.documentElement.clientWidth|document.body.clientWidth) - 273; var divobj = $("QJ_WinFinfo"); divobj.style.width = W;//出错} 自己解决了原来是W3C标准问题。。没定义W3C标准导致IE中document.documentElement.clientWidth为0http://hi.baidu.com/bluedream_119/blog/item/dc377d4bef83aff783025c68.html json的一个问题 脚本 如何从日历控件中,得到用户点击选择后的日期,并存入到一个变量中 js a.html向b.html传url问题 问一正侧表达式! 请教如何使一个列表框动态获取另一个列表框的onChange事件?吐血求助!!!请大家一定帮忙!!! 急!超链问题! 如何用Javascript和SQL server进行连接??? 关于表格行的显示与隐藏问题,在线等!!! 请教高手,如何用javascript产生一个乱数。还要不能重复? 如何让button保持在按下状态 关于一个js在FF和IE下兼容的问题
或许应该改成
document.body.clientWidth
或者
parseInt(document.body.clientWidth)
function $(obj){
return document.getElementById(obj);
}function ChangeWin(){
var W = (document.documentElement.clientWidth|document.body.clientWidth) - 273;
var divobj = $("QJ_WinFinfo");
divobj.style.width = W;//出错
}
原来是W3C标准问题。。没定义W3C标准导致IE中document.documentElement.clientWidth为0http://hi.baidu.com/bluedream_119/blog/item/dc377d4bef83aff783025c68.html