為什么跳轉沒反應,重新打開一個窗口就行
window.location="http://www.xianlaiwan.cn/"; window.location.assign("http://www.w3school.com.cn"); window.location.; window.open("http://www.xianlaiwan.cn/","_blank","width=500px,height=500px"); ?只有最后一行重新打開頁面才有反應,其他的都沒效果
window.location="http://www.xianlaiwan.cn/"; window.location.assign("http://www.w3school.com.cn"); window.location.; window.open("http://www.xianlaiwan.cn/","_blank","width=500px,height=500px"); ?只有最后一行重新打開頁面才有反應,其他的都沒效果
2018-04-26
舉報
2018-05-12
哇 學到了
2018-04-28
得引入JavaScript引用語句:<script type="text/javascript" language="javascript">
另外也得有HTML標簽才行,具體如下:
<html>
<head>
<script type="text/javascript">
window.location="http://www.xianlaiwan.cn/";
? ? ? ? window.location.assign("http://www.w3school.com.cn");
? ? ? ? window.location.;
? ? ? ? window.open("http://www.xianlaiwan.cn/","_blank","width=500px,height=500px");
</script>
</head>
</html>
還有注意你第二行結尾用了中文分號