--------论坛里找到的:----------
使Window以页面的相对大小显示
Java代码 复制代码
- height: document.body.clientHeight * xx%
2. width: document.body.clientWidth * xx%
个人认为:
要是这么写,好像是要语法错的呀
例如我写成这个样子.loginForm表示window里的一个form组件
var win = new Ext.Window({
width: document.body.clientWidth * 80% ,
height: document.body.clientHeight * 60% ,
maximizable: true,
resizable: true,
title: Mytest,
closable: true,
modal: true,
layout: 'border',
items: [loginForm],
closeAction: 'hide'
});
请问,要实现那个效果应该怎么写呢?
[b]问题补充:[/b]
呃~~~我试了一下,果然改成小数点就没问题了,(唉,人有点笨,大家不要见笑)
不过改了之后,我试了一下,如果改变浏览器的大小,这个window是不会跟着移动,自动居住的,要实现这个效果要怎么做呢?