這個(gè)行嗎?
<!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 mymessage=confirm('確定打開(kāi)新窗口嗎?')
? ? ? ? if (mymessage==true)
? ? ? ? {
? ? ? ? ? ? window.open('http://idcbgp.cn/','width=400','height=500','menubar=no','toolbar=no')
? ? ? ? }
? ? ? ? else{
? ? ? ? ? ? document.write("取消")
? ? ? ? }
? ? ? ??
}
? </script>?
?</head>?
?<body>?
?<input type="button" value="新窗口打開(kāi)網(wǎng)站" onclick="openWindow()" />?
?</body>
</html>
2016-02-19
還不夠完善,題目還要求通過(guò)對(duì)話框確定網(wǎng)址,其他的同上
2016-02-19
直接打開(kāi)了網(wǎng)站,這題有個(gè)輸入對(duì)話框你沒(méi)有寫(xiě)
2016-02-19
少了'_blank',因?yàn)橐蜷_(kāi)新窗口,同時(shí)也要確定無(wú)菜單欄、無(wú)工具欄。
2016-02-19
少了請(qǐng)輸入網(wǎng)址然后默認(rèn)是www.xxxxxxxxxxxxx的那一步