[問題] jquery attr onclick IE7 & 8

看板Ajax作者 (芋頭)時間14年前 (2011/01/29 02:30), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/7 (看更多)
問一下 <input type="button" id=1 onclick="alert('001122');" value="alert"> <input type="button" onclick="$('#1').attr('onclick','');" value="C"> <input type="button" onclick="$('#1').attr('onclick','alert(\'334455\');');" value="RE"> 此動作在OPREA OK 但是在IE 清除候 再輸入 $('#1').attr('onclick','alert(\'001122\');'); 卻是沒反應的 但是 是有把 oncilck="alert('334455');" 寫進去 但是不會動作 -- █   █         █ http://www.u-tao.tw █   █ ███  ▄▄█▄ ▄ ▄ █   █ █ █ ▉ █ ▉ █   █ █ █ ▉ █ ▉ ◥▇▇▇◤ █ ◢ █ ▋▊ █ ▉ ██ ▊█ ◥ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 59.105.192.152
文章代碼(AID): #1DGmjU-h (Ajax)
討論串 (同標題文章)
文章代碼(AID): #1DGmjU-h (Ajax)