81,091
社区成员
发帖
与我相关
我的任务
分享
function displayAbout(){
if(document.getElementById("about").style.display == "none"){
document.getElementById("about").style.display = "inline";
document.getElementById("about").style.background-color = "#F7F6F0";
}else{
document.getElementById("about").style.display = "none";
}
};
移动到id为about的div后面就行了。应该是在加载initialize()函数的时候也执行了displayAbout()函数所以报出缺少对象的错误~