如何修改jquery easyui select中option背景颜色

<input type="radio" name="b_group" value="2">模板颜色:<select class="easyui-combobox"  name="state" style="width:200px;" 
						 data-options="textField: 'text', 
						              formatter: formatItem">
						    <option value="" selected="selected">==请选择==</option>
							<option value="red">red</option>
							<option value="green">green</option>
							<option value="gray">gray</option>
							<option value="yellow">yellow</option>
							<option value="blue">blue</option>
							<option value="aqua">aqua</option>
							<option value="purple">purple</option>
							<option value="fuchsia">fuchsia</option>
						</select><br/><br/>
						<script type="text/javascript">
						        function formatItem(row){
					                    var s = '<div style="background-color:'+row.text+'";>' + row.text + '</div>';
					                     return s;       
						         }
						</script>

转自:https://blog.csdn.net/zhengbo0/article/details/10325497

上一篇:easyui入门


下一篇:简单的基于hash和hashchange的前端路由