最赞回答 / 一二一二
<!DOCTYPE HTML><html><head><meta http-equiv="Content-Type" Content="text/html; charset=utf-8" /><title>javascript</title><style type="text/css">body{font-size:12px;}#txt{ height:400px; width:600px; border:#3...
2016-06-05
<!DOCTYPE html>
<html>
<head>
<script>
var a = confirm("are you sure?");
if(a==true){
var b = prompt("please enter a website");
if(b!=null){
window.open(b,'_blank','width=400,height=500,menubar=no,toolbar=no,status=yes,scrollbars=yes')
}
}
</script>
</head>
<body>
</body>
</html>
<html>
<head>
<script>
var a = confirm("are you sure?");
if(a==true){
var b = prompt("please enter a website");
if(b!=null){
window.open(b,'_blank','width=400,height=500,menubar=no,toolbar=no,status=yes,scrollbars=yes')
}
}
</script>
</head>
<body>
</body>
</html>
已采纳回答 / qq_太阳花_6
window.open('http://www.imooc.com','_blank''width=600,height=400,top=100,left=0');这句代码blank和width中间少了一个逗号~
2016-06-04
养成良好的编程习惯,别忘记在语句末尾添加分号";" ,";"分号要在英文状态下输入
2016-06-04
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8 "/>
</head>
<body>
<h2><a href="http://www.baidu.com">百度一下,你就知道!</a></h2>
<p>热门编程语言排行榜:</p>
<ul>
<li>JAVA</li>
<li>JavaScript</li>
<li>C++</li>
</ul>
</body>
</html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8 "/>
</head>
<body>
<h2><a href="http://www.baidu.com">百度一下,你就知道!</a></h2>
<p>热门编程语言排行榜:</p>
<ul>
<li>JAVA</li>
<li>JavaScript</li>
<li>C++</li>
</ul>
</body>
</html>