請問為什么我點擊按鈕沒有反應(yīng)呢?
function a()
?{
??? var b=confirm('歡迎來到慕課網(wǎng)');
???? if (b==true)
?????? {window.open("http://idcbgp.cn",'_blank','width=600px,height=400px');
?? ??? }
?}
?<input type="button" value="點擊我,打開新窗口" onclick=a()/>
function a()
?{
??? var b=confirm('歡迎來到慕課網(wǎng)');
???? if (b==true)
?????? {window.open("http://idcbgp.cn",'_blank','width=600px,height=400px');
?? ??? }
?}
?<input type="button" value="點擊我,打開新窗口" onclick=a()/>
2017-09-09
舉報
2017-09-09
點擊事件 ?應(yīng)該這么寫 ? ?onclick="a();"
2017-09-10
onclick=a()少了冒號,應(yīng)該是onclick="a()";