2012年9月24日 星期一

關閉視窗

<script type='text/javascript'>

function windows_close(){
 window.open('','_parent','');  
 window.opener = null;
 window.open('','_parent','');
 window.close();
}
</script>

<input type='button' onclick='windows_close()' value='關閉視窗'>
ex-2
<script type='text/javascript'>
 function doClose(){this.close();}
</script>

沒有留言: