📄 setbgcolor.js
字号:
function setBgcolor(idname,maxnum,colorstr){
/*----set bgcolor----
idname element name
sid element index
colorstr bgcolor String
*/
var thisObj = document.getElementById(idname);
var arrName = idname.split("_");
var theid;
try{
var ts=arrName[0];
for(i=0;i<maxnum;i++){
theid = document.getElementById(arrName[0] +"_"+ i);
theid.style.backgroundColor="";
}
thisObj.style.backgroundColor=colorstr;
}catch(Exception){
thisObj.style.backgroundColor=colorstr;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -