//传值
window.open ('xxx.aspx?id='+要传的值,'newwindow', 'height=450, width=500, top=0, left=0, toolbar=no, menubar=no, resizable=no,location=no, status=no') ;
//接受值(在后台接受)
string a= Request["id"].ToString();
window.open("http://www.sina.com.cn", "_self");//在原窗口打开
//window.open打开新窗口,然后关闭老窗口。
window.open("test2.htm?word="+document.ww.word.value,"_blank")
window.close()
window.open ('xxx.aspx?id='+要传的值,'newwindow', 'height=450, width=500, top=0, left=0, toolbar=no, menubar=no, resizable=no,location=no, status=no') ;
//接受值(在后台接受)
string a= Request["id"].ToString();
window.open("http://www.sina.com.cn", "_self");//在原窗口打开
//window.open打开新窗口,然后关闭老窗口。
window.open("test2.htm?word="+document.ww.word.value,"_blank")
window.close()
本文介绍了如何利用JavaScript的window.open方法在打开新窗口的同时传递参数,并在新窗口中如何获取这些参数。此外,还提供了关闭当前窗口并打开新窗口的方法。
760

被折叠的 条评论
为什么被折叠?



