function ge(id){
this.id=id;
this.d=document;
this.w=window;
return document.getElementById(id);
}
ge.prototype={
set_in:function(value){
this.innerHTML=value;
},
getIn:function(){
return document.getElementById(this.id).innerHTML;
},
foc:function(){
document.getElementById(this.id).focus();
}
}
我想要做的是,如果我叫GE(「ID」)。getIn()將導致的innerHTML該元素的有沒有人告訴我什麼是錯,此代碼
你會得到什麼? – 2012-04-12 14:23:27
此錯誤:無法調用null的方法'getIn' – 2012-04-12 14:24:36
爲什麼不設置http://jsfiddle.net/? – Jakub 2012-04-12 14:25:11