0
我已经bulid一个js类,它是有控制(HTML控件)参数,我尝试dinamicly onchange事件添加到控件,但我有如下因素的错误:JS错误:HTMLFILE:未实现
HTMLFILE:未实现
//-------------- the code
Contrl.prototype.AddChangeEvent = function() {
var element = this.docID;
var fn = function onChange(element) {
// action
};
if (this.tag == "input" && (this.el.type == "radio")) {
this.el.onclick = fn(element); // there i have the error
}
else {
this.el.onchange = fn(element); // there i have the error
}
}
不仅打电话,但结合this.el.onclick – user368038 2010-06-22 15:04:36
@haroldis:不,你不是绑定它。你正在试图绑定它,但你没有成功。 – SLaks 2010-06-22 15:07:23