var newView={
init:function(){
this.adminB=document.getElementById('admin');
this.formC=document.getElementById('containForm');
this.cancelB=document.getElementById('cancel');
this.render();
},
render:function(){
this.formC.style.visibility="hidden";//lineONE
this.adminB.addEventListener('click',function()
{
this.formC.style.visibility="visible";//ERROR OCCURS HERE
});
this.cancelB.addEventListener('click',function(){
this.formC.style.visibility="hidden";
});
}
};
//在“lineONE”中我没有收到任何错误。但是当我在'click'函数中再次使用相同的变量时,我得到了这个特殊的错误 - “Uncaught TypeError:无法读取未定义的属性'样式'(...)”。 请帮助:)