中国近代经典文学作品:如何在ASP中打开新窗口

来源:百度文库 编辑:高考问答 时间:2024/05/03 03:53:08
如何在ASP中打开新窗口

我ASP有句代码如下:

response.redirect "gensystem.asp"

但是我想打开一个gensystem.asp为400X400的新窗口不知道该如何打开?代码应该加什么?

应该用JavaScript脚本打开的:

function Open_NewWindow(URL)
{
var objNewWin;
objNewWin = window.open(URL,"","fullscreen=0,toolbar=0,location=no,directories=0,status=0,menubar=0,scrollbars=0,resizable=no,width=400,height=400,top=160,left=324");
objNewWin.focus();
}
window.open中width和height是分别定义宽度和高度的.

<script language="javascript">
function openy()
{
window.open "gensystem.asp","","width=400,height=400");
}
</script>

''调用openy()
<a href="javascript:openy()">打开gensystem.asp</a>

response.write ("<script>window.open('gensystem.asp', '', 'width=400,height=400');</script>")

要用javascript, response.redirect只提供基本的页面转向功能

用javascript 就行了。