請教為什么執(zhí)行不了
<!DOCTYPE html>
<html>
?<head>
? <title> new document </title>??
? <meta http-equiv="Content-Type" content="text/html; charset=gbk"/>? ?
? <script type="text/javascript">??
? ? function openWindow()
? ? {
? ? var mycho=confirm("新窗口打開網(wǎng)頁嗎?");
? ? // 新窗口打開時彈出確認框,是否打開
? ? ? ? if (mycho==true)?
? ? ? ? {
? ? ? ? ? ? var mymessage=prompt("輸入網(wǎng)址");
? ? ? ? ? ? if (mymessage!=null)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? window.open(mymessage,'width:400px','height:500px','menubar:no'.'toolbar:no');
? ? ? ? ? ? }
? ? ? ? ? ? else
? ? ? ? ? ? {
? ? ? ? ? ? alert("沒有輸入網(wǎng)址,再見");
? ? ? ? ? ? window.close;
? ? ? ? ? ? }
? ? ? ? }
? ? ? ? else
? ? ? ? {
? ? ? ? ? ? window.close;
? ? ? ? }
? ? }
? </script>?
?</head>?
?<body>?
? <input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />?
?</body>
</html>
2018-12-28
明白了,toolbar逗號寫成了句號。。