为什window.open在这种情况下用不了?
<body>
<!--先编写好网页布局-->
<h1>操作成功</h1>
<span id="second">5</span>
<span>秒后跳转另外一个页面</span>
<input type="button" value="返回" onclick="back()">
<script type="text/javascript">
//获取显示秒数的元素,通过定时器来更改秒数。
var second = document.getElementById("second").innerHTML;
function newopen()
{
second--;
second = document.getElementById("second").innerHTML=second;
if (second == 0)
{
window.open("http://www.imooc.com", "_blank", "width=600px, height=400px");
}
}
setInterval("newopen()", 1000);
function back()
{
window.history.back();
}
</script>
</body>