次のコードを使用して、現在のウィンドウを自動的に閉じ、変数に新しい URL を指定して新しいウィンドウを開きます。
コードに何か問題があり、もう機能していません。閉じていますが、新しいウィンドウを再度開いていません。
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<meta http-equiv="prahma" content="no-cache">
<title>Auto Close and Open New window</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="javascript">
var url = "http://www.myweb.com/weather_control.php?"+Math.random()
window.open(url,"","");
window.open('', '_self', '');
window.close();
</script>
</head>
<body onload="closeIt();">
</body>
</html>
「このサイトのポップアップを常に許可する」に同意する必要があります。