<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>window对象</title>
<script type="text/javascript">
function myclick(){
alert("welcome to imooc");
window.open('http://www.imooc.com','_blank','width:600px;height:400px');
</script>
</head>
<body>
<form>
<input type="button" value="点击我,打开新窗口" target="_blank" onclick="myclick()" />
</form>
</body>
</html>
function少了个}
width=600,height=400 不是width:600这样的css写法
//这样的效果是否可以
function myclick(){
var results= confirm("欢迎来到慕课网");
if(results){
window.open("https://www.imooc.com/");
}
}