alert(screen.availHeight);
alert(screen.availWidth);
alert(screen.height);
alert(screen.width);
通过以上四个参数控制好了。
alert(screen.availWidth);
alert(screen.height);
alert(screen.width);
通过以上四个参数控制好了。
解决方案 »
- |zyciis| 如何在window下调用一个知道名称的对像,谢谢 有代码
- 请指教asp下拉列表的排列顺序问题?
- js变量的作用域问题
- alter中不支持韩文与日文的原因?
- 正则表达式?
- 如何使一张图片旋转非90度?
- 作了个动态图片切换效果IE浏览没问题,可firefox却出现什么has no properties的错误,在线等待。。。
- 关于滑动选项卡的问题
- 选择文件夹的输入框怎么写呀?(就像选择文件的输入那种形式的)
- 可不可能用javascript在两个html页面之间传递参数?急!!!
- 动态表格:给每行tr一个id,如何动态定位行并进行删除?
- 请教,如果调用javascript进行后台打印(在线等待)
obj.style.width ="300px";
obj.style.height ="200px";
obj.style.top =(screen.availHeight-parseInt(obj.style.height))/2;
obj.style.left =(screen.availWidth-parseInt(obj.style.width))/2;
obj.style.backgroundColor ="#FF0000"; //层的背景颜色
document.body.appendChild(obj);
不错