JAVAscript問題
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>close()</title>
? <script type="text/javascript">
? ? ?var mywin=window.open("http://idcbgp.cn");
?
? </script>
</head>
<body>
</body>
</html>?
這串代碼并沒有輸出變量mywin,可為什么只要一點擊運行就會打開新窗口呢????? ??
2017-02-05
不需要輸出mywin變量
你在執(zhí)行window.open("******");的時候就會打開你指定的網(wǎng)址,然后將該窗口對象賦值給變量mywin