?<!DOCTYPE?HTML>
<html>
<head>
<meta?http-equiv="Content-Type"?content="text/html;?charset=utf-8">
<title>瀏覽器對象</title> <script type="text/javascript"> ? function openWindow() { ? ? ? ? ? if(confirm("確認打開新網(wǎng)站嗎?")){ //確認打開網(wǎng)頁 ? ? ? ? ? var url = prompt("在對話框中輸入網(wǎng)址","http://idcbgp.cn/");//打開網(wǎng)頁 ? ? ? ? ? ? window.open( url,"_blank",'width=400,height=500,menubar=no,toolbar=no'); ? ? ? ? ? ? ? } </script> ?</head>body>? <input type="button" value="新窗口打開網(wǎng)站" onclick="openWindon()" /> </body></html>
為什么點擊按鈕會沒有反應(yīng)呢?
我是攻城獅3922093
2016-09-22 01:11:41