window.close()で自分自身をcloseしようとする場合にダイアログが表示されますが、ダイアログを表示
させないでWindowを閉じる方法
<html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="Content-Style-Type" content="text/css; charset=utf-8"/>
<meta http-equiv="Content-Script-Type" content="text/javascript; charset=utf-8"/>
<script language=Javascript>
function winClose(){
window.open('newWin.html', 'newWindow', 'width=400, height=300, menubar=no, toolbar=no, scrollbars=yes');
p = window.open('','_top').opener=top;
p.close();
}
</script>
<body onload="winClose()">
<button type="button" onclick="(window.open('','_top').opener=top).close();">ここをクリックすると閉じます</button>
</body>
</html>