87,901
社区成员
发帖
与我相关
我的任务
分享
var easychange = function(foochange){
if(!foochange||foochange.constructor!=Function){return;}
try{this.watch("value",function(id,oldval,newval){foochange(newval);return newval;});}catch(e){}
this.setAttribute('oninput','('+foochange.toString()+')(this.value)');
this.onpropertychange = function(){foochange(this.value);};
this.onmousemove = function(){foochange(this.value);};
this.onkeyup = function(){foochange(this.value);};
};
var dx = document.getElementById('x');
easychange.call(dx,function(newvalue){document.title = newvalue;});