點(diǎn)擊按鈕沒(méi)有打開(kāi)新窗口
請(qǐng)幫我看看哪里出問(wèn)題?
<!DOCTYPE?HTML> <html> <head> <meta?http-equiv="Content-Type"?content="text/html;?charset=utf-8"> <title>window對(duì)象</title> <script?type="text/javascript"> alert("歡迎來(lái)到慕課網(wǎng)"); function?open(){ ????window.open('http://idcbgp.cn','_blank','width=600,height=400'); } </script> </head> <body> <form> <input?type="button"?value="點(diǎn)擊我,打開(kāi)新窗口"??onclick="open()"?/> </form> </body> </html>
2017-08-18
open是window的方法,再定義就沖突了,可以換個(gè)函數(shù)名
2017-08-17
open是關(guān)鍵保留字嗎?換了函數(shù)名就解決了