如题,由于文字内容太多,我想固定控件的宽度,然后让控件的高度为'96.7%,超过时,出现下拉条。
代码如下:
{
xtype: 'displayfield',
name: 'info.content',
value:this.content,
anchor: '96.7%',
height: 200
} 在火狐中,是有下拉条的,但是在IE下却没有、同一条记录、这是为什么啊,谁能告诉我啊???在线等。谢过了,先。
代码如下:
{
xtype: 'displayfield',
name: 'info.content',
value:this.content,
anchor: '96.7%',
height: 200
} 在火狐中,是有下拉条的,但是在IE下却没有、同一条记录、这是为什么啊,谁能告诉我啊???在线等。谢过了,先。
{
var theWidth,theHeight;
if (window.innerWidth)
{
theWidth = window.innerWidth
theHeight = window.innerHeight
}
else if (document.compatMode=='CSS1Compat')
{
theWidth = document.documentElement.clientWidth
theHeight = document.documentElement.clientHeight
}
else if (document.body)
{
theWidth = document.body.clientWidth
theHeight = document.body.clientHeight
}
var result = [theWidth,theHeight];
return result;
}
用这个函数获得浏览器窗口高宽,兼容性好
代码如下:
{ xtype: 'displayfield',
name: 'info.content',
value:this.content,
//anchor: '96.7%',
renderer:getScreenSize
//height: 200
}
getScreenSize : function()
{
var theWidth,theHeight;
if (window.innerWidth)
{
theWidth = window.innerWidth;
theHeight = window.innerHeight;
}
else if (document.compatMode=='CSS1Compat')
{
theWidth = document.documentElement.clientWidth;
theHeight = document.documentElement.clientHeight;
}
else if (document.body)
{
theWidth = document.body.clientWidth;
theHeight = document.body.clientHeight;
}
var result = [theWidth,theHeight];
return result;
}
可以了,谢了,是我的引用写错了,谢过