Javascript dojo.connect不适用于onClick事件(在Internet Explorer中)

Javascript dojo.connect不适用于onClick事件(在Internet Explorer中),javascript,event-handling,dojo,internet-explorer-8,dom-events,Javascript,Event Handling,Dojo,Internet Explorer 8,Dom Events,我添加了这样的dojo.connect语句 dojo.connect(dojo.byId(this._paramsForm), "onChange", this, "_handleUpdate"); 此时,当我调试浏览器并检查值时,this.\u paramsForm具有有效值。 但是当事件被触发时,onChange函数不会被调用。dojo.connect语句中一定有问题,但无法跟踪它 也试过这个,运气不好:( 也提到了这个链接,没有运气 但在Chrome和Firefox中,同样的功能也非常

我添加了这样的
dojo.connect
语句

dojo.connect(dojo.byId(this._paramsForm), "onChange", this, "_handleUpdate");
此时,当我调试浏览器并检查值时,
this.\u paramsForm
具有有效值。 但是当事件被触发时,
onChange
函数不会被调用。
dojo.connect
语句中一定有问题,但无法跟踪它

也试过这个,运气不好:(

也提到了这个链接,没有运气

但在Chrome和Firefox中,同样的功能也非常好


请帮助我解决此问题!

我认为您注册事件处理程序的方式是错误的-请尝试以下方法:

require('dojo/_base/lang', 'dojo/on');

on(this._paramsForm, "change", lang.hitch(this, _handleUpdate));
请注意,在最新版本中,前缀“on”已被删除-您只需使用“click”、“change”等作为事件名称。lang.hitch-确保在“this”上下文中执行_handleUpdate

如果您使用的是较旧版本的dojo(<1.7),则代码类似:

dojo.connect(this._paramsForm, "onChange", dojo.hitch(this, _handleUpdate));

您使用的是什么版本的Dojo
dojo.connect(this._paramsForm, "onChange", dojo.hitch(this, _handleUpdate));