求大神指導,為什么我打開網頁之后,地址出錯了,總是顯示 http://www.xianlaiwan.cn/code/http://www.xianlaiwan.cn/
<!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 newWindow = confirm("是否打開新窗口");
??? if (newWindow==true)
??? {
??????? var address = prompt ("通過輸入對話框,確定打開的網址","http://www.xianlaiwan.cn/");
??????? if (address!=null)
??????? {
??????????? window.open(address, '_blank', 'width=400,height=500,menubar=no,toolbar=no');
??????? }
??????? else
??????? {
??????????? alert("再見");
??????? }
??? }
??? else
??? {
??????? alert("再見");
??? }
}
???
???
? </script>
?</head>
?<body>
?? <input type="button" value="新窗口打開網站" onclick="openWindow()" />
?</body>
</html>
2017-07-22
你是中文狀態輸的吧,實施英文狀態重輸一遍網址http://www.xianlaiwan.cn