这段javascript应该如何写?谢谢!
function SetSize() {
document.all.wsMain.height = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
}
因挡住,想让document.all.wsMain.height 在这基础上再少20px,这段javascript应该如何写?谢谢!
------解决方案--------------------
document.all.wsMain.height = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight) - 20;
------解决方案--------------------
JScript codefunction SetSize() { document.all.wsMain.height = (Math.max(document.body.scrollHeight, document.documentElement.scrollHeight) - 20) + 'px';}
------解决方案--------------------
JScript codedocument.all.wsMain.height = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight) - 20; //这样?
------解决方案--------------------
JScript codefunction SetSize() { var h = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight) document.all.wsMain.height = h-20 或者h - 20 +'px'; //这样??? }
查询谷 - www.chaxungu.com
这段javascript应该怎么写?多谢
编辑:chaxungu时间:2022-10-02 23:14:26分类:web开发
上一篇:JavaScript实践解决方法
下一篇:jquery data 有关问题