大家看看这个是不是个BUG 本帖最后由 YOURFISH 于 2009-11-17 22:37:51 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <body onload="start()">start()方法再哪里? 哈哈,当时做测试的时候,作太久了,人迷糊了,原来,我把位置放错了如下原来是这样testdata="offsetHeight: "+c.offsetHeight+" c.maxh:"+c.maxh+'\n'; //+++++++++++(上面句子)就是这里怪明明c.max在这里未赋任何值,c.offsetHeight值为0 c.style.display = 'block'; c.style.height = 'auto'; c.maxh = c.offsetHeight; //+++++++++++上面句子)这里把c.offsetHeight赋给了c.max,c.max应该为0呀 c.style.height = '0px'; testdata+="c.maxh:"+c.maxh+" offsetHeight: "+c.offsetHeight+'\n';一看就知道了,c.style.height又被赋了零了,所以c.offsetHeight(这个应该是这个c对象的属性表示这个对象的高)又变为0了,所以应该把下面这个testdata+="c.maxh:"+c.maxh+" offsetHeight: "+c.offsetHeight+'\n';放到c.style.height='0px';上面才对了.哈哈 jquery指定table某tr下动态添加tr 网页浏览器怎么做???? 正则表达式 请教FCKeditor工作原理 表单验证问题 js 正则替换 高手看一下!急 这个语句是什末意思? 这个论坛(csdn)右边的导航栏用javascript怎么做啊,哪位大哥帮下忙!谢谢了! 怎么让我的层的位置是相对的?而不是绝对的? highcharts X轴问题 复选框和文本框之间的特效用JS怎么写? JS文件 传参 参数是数组 耽误大家几分钟 帮帮忙
start()方法再哪里?
原来是这样
testdata="offsetHeight: "+c.offsetHeight+" c.maxh:"+c.maxh+'\n';
//+++++++++++(上面句子)就是这里怪明明c.max在这里未赋任何值,c.offsetHeight值为0
c.style.display = 'block';
c.style.height = 'auto';
c.maxh = c.offsetHeight;
//+++++++++++上面句子)这里把c.offsetHeight赋给了c.max,c.max应该为0呀
c.style.height = '0px';
testdata+="c.maxh:"+c.maxh+" offsetHeight: "+c.offsetHeight+'\n';
一看就知道了,c.style.height又被赋了零了,所以c.offsetHeight(这个应该是这个c对象的属性表示这个对象的高)又变为0了,所以应该把下面这个testdata+="c.maxh:"+c.maxh+" offsetHeight: "+c.offsetHeight+'\n';
放到c.style.height='0px';上面才对了.哈哈