日期:2014-05-16 浏览次数:20338 次
function dlgAutoResize(tblID) { var width = document.all[tblID].offsetWidth; var height = document.all[tblID].offsetHeight; width = eval(width + 52); height = eval(height + 82); if (width > screen.width) { width = screen.width; } if (height > screen.height) { height = screen.height; } }
function dlgAutoResize(tblID) { resize=setInterval(Func, 1000); } function Func() { var width = document.all['tblMain'].width; var height = document.all['tblMain'].height; if(width < screen.width) { if(width=="") width=document.all['tblMain'].offsetWidth; document.all['tblMain'].width=eval(parseInt(width*(1+0.1))); } if(height < screen.height) { if(height=="") height=document.all['tblMain'].offsetHeight; document.all['tblMain'].height=eval(parseInt(height*(1+0.1))); } }
------解决方案--------------------
多写了resize,用下面这个
function dlgAutoResize(tblID) { setInterval(Func, 1000); } function Func() { var width = document.all['tblMain'].width; var height = document.all['tblMain'].height; if(width < screen.width) { if(width=="") width=document.all['tblMain'].offsetWidth; document.all['tblMain'].width=eval(parseInt(width*(1+0.1))); } if(height < screen.height) { if(height=="") height=document.all['tblMain'].offsetHeight; document.all['tblMain'].height=eval(parseInt(height*(1+0.1))); } }
------解决方案--------------------
如需要阅读该回复,请登录或注册CSDN!