<!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;
mymessage = confirm("确定打开新网页?");
if (mymessage==true)
{
var myweb=prompt("请输入你的网址:","http://www.imooc.com/");
window.open(myweb,'_blank','width=400,height=500,menubar=no,toolbar=no');
}
else{}
}
</script>
</head>
<body>
<input type="button" value="新窗口打开网站" onclick="openWindow()" />
</body>
</html>
你把红色标注的()删去应该就好了,()括号不是名字