我可以完成要求,請問有沒有改進的地方?
<script type="text/javascript">
function openWindow() {
var open = confirm("新窗口打開網站");
if (open == true) {
var pro = prompt("確定打開的網址", "http://www.xianlaiwan.cn");
if (pro != null) {
window.open('http://www.xianlaiwan.cn', '_blank', 'width=400,heighth=500,menubar=no,tollbar=no');
} else {
null
}
} else {
}
}
</script>
</head>
<body>
<input type="button" value="新窗口打開網站" onclick="openWindow()" />
</body>
</html>
2018-10-23
挺好的,這些都是基礎,往后學習就會發現用不到了,加油吧