Ê×ÏÈ,ÔÚpageloadÀïдÈëÒÔÏ´úÂë:Response.Write("<script>window.opener=null;window.close();</script>");
Æä´Î,ÔÚheadÀïдÏÂÈçÏÂJS´úÂë: <script language="JavaScript">
<!--
function openwin() { window.open ("Default.
aspx", "newwindow", "height=600, width=600, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no")
//д³ÉÒ»ÐÐ
}
-->
</script>
×îºó,ÔÚBODYÀïµ÷ÓÃOPENWIN()·½·¨:<body onunload="openwin()">
ÕâÀïµÃResponse.Write("<script>window.close();</script>");// »áµ¯³öѯÎÊÊÇ·ñ¹Ø±ÕResponse.Write("<script>window.opener=null;window.close();</script>");// ²»»áµ¯³öѯÎÊ
window.open()Ïê½âÈçÏÂ:
Ò»¡¢window.open()Ö§³Ö»·¾³£ºJavaScript1.0+/JScript1.0+/Nav2+/IE3+/Opera3+
¶þ¡¢»ù±¾Óï·¨£º
window.open(pageURL,name,parameters)
ÆäÖУº
pageURLΪ×Ó´°¿Ú·¾¶
nameΪ×Ó´°¿Ú¾ä±ú
parametersΪ´°¿Ú²ÎÊý(¸÷²ÎÊýÓöººÅ·Ö¸ô)
Èý¡¢Ê¾Àý£º
<SCRIPT>
<!-- window.open
('page.html','newwindow','height=100,width=400,top=0,left=0,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no')
//д³ÉÒ»ÐÐ
-->
</SCRIPT>
½Å±¾ÔËÐкó
£¬page.html½«ÔÚд°ÌånewwindowÖдò¿ª
£¬¿íΪ100£¬¸ßΪ400£¬¾àÆÁ¶¥0ÏóËØ£¬ÆÁ×ó0ÏóËØ£¬ÎÞ¹¤¾ßÌõ£¬Î޲˵¥Ìõ£¬ÎÞ¹ö¶¯Ìõ£¬²»¿Éµ÷Õû´óÐ
¡£¬ÎÞµØÖ·À¸£¬ÎÞ״̬À¸
¡£Çë¶ÔÕÕ¡£
ÉÏÀýÖÐÉæ¼°µÄΪ³£Óõļ¸¸ö²ÎÊý£¬³ý´ËÒÔÍ⻹ÓкܶàÆäËû²ÎÊý£¬Çë¼ûËÄ¡£
ËÄ¡¢¸÷Ïî²ÎÊý
ÆäÖÐyes/noÒ²¿ÉʹÓÃ1/0£»pixel valueΪ¾ßÌåµÄÊýÖµ£¬µ¥Î»ÏóËØ¡£
²ÎÊý|È¡Öµ·¶Î§|˵Ã÷
alwaysLowered | yes/no |Ö¸¶¨´°¿ÚÒþ²ØÔÚËùÓд°¿ÚÖ®ºó
alwaysRaised | yes/no |Ö¸¶¨´°¿ÚÐü¸¡ÔÚËùÓд°¿ÚÖ®ÉÏ
depended | yes/no |ÊÇ·ñºÍ¸¸´°¿Úͬʱ¹Ø±Õ
directories | yes/no | Nav2ºÍ3µÄĿ¼À¸ÊÇ·ñ¿É¼û
height | pixel value |´°¿Ú¸ß¶È
hotkeys | yes/no |ÔÚû²Ëµ¥À¸µÄ´°¿ÚÖÐÉè
°²È«Í˳öÈȼü
innerHeight | pixel value |´°¿ÚÖÐÎĵµµÄÏñËظ߶È
innerWidth | pixel value |´°¿ÚÖÐÎĵµµÄÏñËØ¿í¶È
location | yes/no |λÖÃÀ¸ÊÇ·ñ¿É¼û
menubar | yes/no |²Ëµ¥À¸ÊÇ·ñ¿É¼û
outerHeight | pixel value |É趨´°¿Ú(°üÀ¨×°Êα߿ò)µÄÏñËظ߶È
outerWidth | pixel value |É趨´°¿Ú(°üÀ¨×°Êα߿ò)µÄÏñËØ¿í¶È
resizable | yes/no |´°¿Ú´óСÊÇ·ñ¿Éµ÷Õû
screenX | pixel value |´°¿Ú¾àÆÁÄ»×ó±ß½çµÄÏñËس¤¶È
screenY | pixel value |´°¿Ú¾à