為什么我這樣寫百度首頁(yè)出不來???
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>window.open</title>
<script type="text/javascript">
? function window.open(){
? ?'http://www.baidu.com/','_blank','width=600,hieght=400,top=100px,left=0px ' ?
?}?
</script>
</head>
<body>
? ? <input name="button" type="button" onClick="window.open()" value="點(diǎn)擊我,打開新窗口!" / >
</body>
</html>
2015-08-02
函數(shù)名不要取JS的關(guān)鍵字,也不能帶點(diǎn)。我估計(jì)你是把函數(shù)和方法弄混了。
修改后的代碼
你看下有什么不懂的