[問題] IE 無法用 setAttribute 設定 onclick

看板Ajax作者 (痞子軍團團長)時間17年前 (2008/09/13 01:42), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/2 (看更多)
我想要用這種方法設定 onclick 的 function var aDivOrSpan = document.getElementById("foo"); aDivOrSpan.setAttribute("onclick", "clickFunction(event)"); 這在 FX 上頭沒有問題 但是到了 IE6.0 上頭就無聲無息 請問有什麼解法(除了直接在 html 裡頭設定 XD) 或是要怎麼找相關的資料 Orz -- 侃侃長論鮮窒礙 首頁:http://www.psmonkey.idv.tw 眾目睽睽無心顫 Blog:http://ps-think.blogspot.com 煢居少聊常人事 殺頭容易告白難 歡迎參觀 Java 版(@ptt.cc)精華區 \囧/ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 124.218.58.96
文章代碼(AID): #18ogdlSU (Ajax)
文章代碼(AID): #18ogdlSU (Ajax)