js判断页面高度,如果窗口超过800PX则出现某div,高手请指教! js判断页面高度,如果超过800PX则出现某div,高手请指教! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 jQuery:$(document).height()$(document).width() if(document.documentElement.clientHeight>800 || document.body.clientHeight>800){div.style.display="block";} var doc = document.compatMode.toLowerCase() == "backcompat" ? document.body : document.documentElement; var pageHeight = doc.scrollHeight; if (pageHeight > 800) { alert("页面内容高度大于800"); } var doc = document.compatMode.toLowerCase() == "backcompat" ? document.body : document.documentElement; var pageHeight = doc.scrollHeight; if (pageHeight > 800) { alert("页面内容高度大于800"); }好! 用到了jquery获取高度function getPageHeigth(){ if($.browser.msie){ return document.compatMode == "CSS1Compat"? document.documentElement.clientHeight : document.body.clientHeight; }else{ return self.innerHeight; }} 文章搜索加验证码并验证验证码的代码哪里出错了?请指点。 请教JS在火狐,苹果,谷歌浏览器的兼容性问题 样式 占位 css js导航菜单问题(急) 不用execCommand实现同样的效果 小弟不懂JS,求一代码 JavaScript中的值传递问题? 打印预览如何用javascript实现?一定给分!!! 用javascript打开一个新窗口的代码为什么会出现这样的怪问题? 请教一个cookie的问题 Extjs的numberfield的问题.. 左侧隐藏菜单在火狐不正常,怎么改?
$(document).width()
{
div.style.display="block";
}
var doc = document.compatMode.toLowerCase() == "backcompat" ? document.body : document.documentElement;
var pageHeight = doc.scrollHeight;
if (pageHeight > 800) {
alert("页面内容高度大于800");
}
好!
获取高度
function getPageHeigth(){
if($.browser.msie){
return document.compatMode == "CSS1Compat"? document.documentElement.clientHeight :
document.body.clientHeight;
}else{
return self.innerHeight;
}
}