in the opened page, try
<script language=javascript>
function window.onload()
{
var w = document.body.scrollWidth;
var h = document.body.scrollHeight; if (w > 400)
w = 400;
if (h > 400)
h = 400; window.resizeTo(w,h);
}
</script>otherwise, you need to do it in the parent page:
<script>
var win = window.open("TestOpen2.html");
setTimeout("resizeChild()", 1000);function resizeChild()
{
if (win != null && !win.closed)
{
if (win.document.readyState == "complete")
{
var w = win.document.body.scrollWidth;
var h = win.document.body.scrollHeight; if (w > 400)
w = 400;
if (h > 400)
h = 400; win.resizeTo(w,h);
}
else
{
setTimeout("resizeChild()", 1000);
}
}
}
</script>
<script language=javascript>
function window.onload()
{
var w = document.body.scrollWidth;
var h = document.body.scrollHeight; if (w > 400)
w = 400;
if (h > 400)
h = 400; window.resizeTo(w,h);
}
</script>otherwise, you need to do it in the parent page:
<script>
var win = window.open("TestOpen2.html");
setTimeout("resizeChild()", 1000);function resizeChild()
{
if (win != null && !win.closed)
{
if (win.document.readyState == "complete")
{
var w = win.document.body.scrollWidth;
var h = win.document.body.scrollHeight; if (w > 400)
w = 400;
if (h > 400)
h = 400; win.resizeTo(w,h);
}
else
{
setTimeout("resizeChild()", 1000);
}
}
}
</script>
解决方案 »
- 求救,希望哪个大哥帮帮我
- 用Session在页面间传值,Session中最大能存多大容量的数据?
- DetailView的EditTemplate中FindControl问题,好长时间了,在线等~~~
- csc 设置环境变量的问题
- 我把网站上传到服务器时,他为什么说我 未能加载程序集“App_Web_xjvyde4h”。请确保在访问该页之前已经编译了此程序集。是什么原因啊?
- 从别的机子上考的程序,虚礼目录我已经建过,里面的“应用程序”我也创建了?怎么还是有这个错误“应用程序中的服务器错误”?
- 简单问题,即刻揭帖!!!
- 哪有好的ASP.NET的虚拟主机空间?
- 执行错
- 如果解决函数之间如何传递链接的问题
- 请问在asp.net中如何把一个控件设置为hidden(隐藏)?
- 怎样把值传到另一个页面?谢谢!
http://expert.csdn.net/Expert/topic/2001/2001793.xml?temp=.1702082
http://expert.csdn.net/Expert/topic/1911/1911975.xml?temp=.4667322
left=(screen.width-imageNew.width)/2;window.open("ZoomOutPic.htm",strWinName,"width=" + imageNew.width + "px,height=" + imageNew.height + "px,top=" + top +"px,left=" + left + "px");