Javascript 关闭窗口并打开新窗口
我想做的是当页面加载时 自动关闭窗口,然后打开一个新窗口 这是我正在使用的代码Javascript 关闭窗口并打开新窗口,javascript,html,window,Javascript,Html,Window,我想做的是当页面加载时 自动关闭窗口,然后打开一个新窗口 这是我正在使用的代码 <!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"> <
<!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 = "step5.php"
window.open(url,"","");
window.open('', '_self', '');
window.close();
</script>
</head>
<body onload="closeIt();">
</body>
</html>
自动关闭并打开新窗口
var url=“step5.php”
打开(url,“,”);
窗口。打开(“”,“”,“”);
window.close();
窗口关闭,但不打开新窗口。必须先打开新窗口,然后关闭旧窗口