var oOption = document.createElement("OPTION");
oOption.text = data["nextLevelOrglst"][i].branchName;
oOption.value = data["nextLevelOrglst"][i].branchId;
上面是给option加值和文本,请问怎么给oOption加字体颜色和背景颜色??????
成功立刻给分
------解决方案--------------------
- JScript code
var oOption = document.createElement("OPTION"); oOption.text = "text"; oOption.value = "value"; oOption.style.cssText += ";color: green; background-color: yellow;";