我無法在mshtml中觸發「onchange」事件。你能告訴我我在這裏做錯了嗎?mshtml fireevent onchange not firing
HTMLSelectElement element = (HTMLSelectElement)this.HTMLDocument.all.item(controlId, 0);
IHTMLElement e = element as IHTMLElement;
IHTMLDocument4 doc = e.document as IHTMLDocument4;
object dummy = null;
object eventObj = doc.CreateEventObject(ref dummy);
HTMLSelectElementClass se = element as HTMLSelectElementClass;
se.FireEvent("onchange", ref eventObj);
我得到變量「se」爲空。我從另一個鏈接得到這段代碼http://www.itwriting.com/phorum/read.php?3,1507
任何人都可以幫助我。
感謝,對象生成 山姆