var col=['blue','green','yellow','purple'];
var index=0;
function change(){
document.body.style.backgroundColor = col[index];
index++;
If (index>=col.length){
index=0;}
}
AI架构师易筋的博客 如果您希望在运行应用程序时随时查看背景颜色,则可以暂时将viewDidLoad()里面的以下行注释掉SpotInfoViewController。 // Clear background colors from labels and buttons for view in backgroundColoredViews {...