在HTML DOM模型中,节点没有offsetWidth、clientWidth、属性,为什么却可以再js中调用呢?
解决方案 »
- 新手求助
- 求助:pdf阅读器ie插件
- 模仿腾迅左右滚动图片功能,请问下怎么循环滚动下去的?
- firebug 内存断点
- javascript技术问题,XDJM帮忙了,
- window.open 一个窗口的时候 写死了 子窗口的大小,子窗口还能不能通过js再改变 其大小
- div随点击的按钮移动
- sina博客中首页设置窗口滚动条移动时该窗口固定不动是如何实现?
- 关于javascript读取文件的问题(急)!
- String c_wc=(String)myVector.get(i+3);与String c_wc="0001";有何区别
- 如何在jsp中传递一个数组给javascript,然后在javascript中通过循环的方式将数组里面的值显示出来....
- 关于ExtJs JsonStore复制的问题
function getScreenSize(target)
{
var theWidth,theHeight;
if (target.innerWidth)
{
theWidth = target.innerWidth
theHeight = target.innerHeight
}
else if (target.document.compatMode=='CSS1Compat')
{
theWidth = target.document.documentElement.clientWidth
theHeight = target.document.documentElement.clientHeight
}
else if (target.document.body)
{
theWidth = target.document.body.clientWidth
theHeight = target.document.body.clientHeight
}
var result = [theWidth,theHeight];
return result;
}var width = getScreenSize(window)[0];
var height=getScreenSize(window)[1];
alert("宽:"+width+",高:"+height);