大神还未崛起3386815
2016-05-21 23:18
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>window.open</title>
<script type="text/javascript">
function wopen(){
windoe.open('http:www.imooc.com','blank','width=600','height=400','top=100','left=o',)
}
</script>
</head>
<body>
<input name="button" type="button" onClick="Wopen()" value="点击我,打开新窗口!" / >
</body>
</html>
应该是window.open('http://www.imooc.com', '_blank', 'width=600px', 'height=400px', 'top=100px', 'left=0px');
你window这个单词拼写错了,还有blank要加下划线,你把left的值0px写成了英文小写o了
网址双斜杠没有了,left=0而不是o
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>window.open</title>
<script type="text/javascript">
function wopen(){
window.open('http://www.imooc.com','blank','width=600,height=400,top=100,left=0')
}
</script>
</head>
<body>
<input name="button" type="button" onclick="wopen()" value="点击我,打开新窗口!" / >
</body>
</html>
<input name="button" type="button" onClick="Wopen()" value="点击我,打开新窗口!" / >
你的函数是wopen!=Wopen
windoe.open('http:www.imooc.com','blank,width=600,height=400,top=100,left=o,)
JavaScript入门篇
739818 学习 · 9566 问题
相似问题