<!DOCTYPE html>
<html>
<head>
<title> new document </title>
<meta http-equiv="Content-Type" content="text/html; charset=gbk"/>
<script type="text/javascript">
var openwind = confirm("是否打開新窗口?")
if(openwind == true)
var url = "http://www.xianlaiwan.cn";
var owd = prompt("確定打開的網址",url);
window.open(owd,'_blank','width=400,height=500,menubar=no,toolbar=no');
</script>
</head>
<body>
<form>
<input type="button" value="新窗口打開網站" onclick="openWindon()" />
</form>
</body>
</html>
這一段代碼,在這個網站上的編譯器出不來外鏈網站,但是砸dreamweaver上面倒是可以打開,也不知道為什么、
2022-03-23
謝謝老師,學習了樓上說滴是正確地
2014-08-29
在我電腦是是可以運行的,您用的是什么瀏覽器呢?您可以換個瀏覽器進行嘗試