//alert(document.documentElement.clientWidth);//文档可视区域宽度
}1$(document).ready(function()
2{3alert($(window).height());//浏览器时下窗口可视区域高度4alert($(document).height());//浏览器时下窗口文档的高度5alert($(document.body).height());//浏览器时下窗口文档body的高度6alert($(document.body).outerHeight(true));//浏览器时下窗口文档body的总高度包括borderpaddingmargin7alert($(window).width());//浏览器时下窗口可视区域宽度8alert($(document).width());//浏览器时下窗口文档对于象宽度9alert($(document.body).width());//浏览器时下窗口文档body的高度10alert($(document.body).outerWidth(true));//浏览器时下窗口文档body的总宽度包括borderpaddingmargin11}12)只要加载到所要执行部分的结构就会执行
$(document).ready(function(){})-------------------------------------其中window可以使任何对象
window.onload=function(){//界面加载完了执行的内容}--------------------------------------------------Javascript刷新页面的几种方法:
history.go(0)location.reload()location=locationlocation.assign(location)document.execCommand('Refresh')window.navigate(location)location.replace(location)document.URL=location.href说明一下,jQuery没有发现刷新页面的方法。
window.resize(function(){上面选一个放到这里。});新闻热点
疑难解答