Ext 如何实现Window以页面的相对大小显示

--------论坛里找到的:----------
使Window以页面的相对大小显示
Java代码 复制代码

  1. 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是不会跟着移动,自动居住的,要实现这个效果要怎么做呢?

width: document.body.clientWidth * 80% ,
height: document.body.clientHeight * 60% ,

改成

width: document.body.clientWidth * 0.8 ,
height: document.body.clientHeight * 0.6 ,

行不?脑子太死了

一个问题归一个问题,先给分,再问