<!DOCTYPE HTML><html><head><meta charset="utf-8"><title>練習(xí)</title><script>? ? ? ?function book() ? ? ? ? ? ?{var asd=prompt("請輸入網(wǎng)址:"); if{asd!=null} ? ?{window.open(tv,"_blank","width=600,height=400,top=50");} ? ? else if(asd=="") ? ?{alert("未輸入網(wǎng)址");} else if(asd==null) ? ?{alert("請輸入網(wǎng)址");} }</script></head><body>? ? ? <form> ? ? ? <input type="button" name="button" onclick="book()" value="點擊輸入網(wǎng)址" />? ?</form></body></html>
這段代碼哪有問題,為什么點擊按鈕沒有反應(yīng)?
玉鴦子
2016-09-10 10:31:50