form1.select1.options[1].style.backgroundColor="green";
form1.select1.options[1].style.fontWeight="bold";
form1.select1.options[1].style.fontSize="20px"
form1.select1.options[1].style.fontWeight="bold";
form1.select1.options[1].style.fontSize="20px"
解决方案 »
- 关于正则“|”的问题
- 在div中让图片左右滑动,滑动到右端停止,求教(附代码与html)
- 给当前页赋值
- js面向对象方法写的树怎么实现getParent()方法
- 火狐下的下拉列表问题
- 关于 combox 联动时改变第二个 combox 内容
- 三级右拉式菜单的问题
- 我想让这个表格出现一个上下,左右的滚动条,可是怎么不对?
- 怎样用javascript实现java中vector的功能,可否给出代码?谢谢
- 如何从后台控制要输入的文本字体,文本大小,文本颜色,文本位置。
- xuzuning(唠叨)請進:數組排序,在IE正常,Netscape就不聽使喚啦!!!
- 急,高手指教,如何在frameset之内传递参数
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>select问题</title>
</head><body>
<form name="form1" method="post" action="">
<select name="select1" size="10">
<option value="a">aaaaaaa</option>
<option value="b">bbbbbbb</option>
<option value="c">ccccccc</option>
</select>
</form></body>
<script language="JavaScript">
<!--
//改变字体颜色(以下代码正确)
form1.select1.options[0].style.color="red";
//改变背景颜色(以下代码错误)
form1.select1.style.backgroundColor="green";
//改变大小
form1.select1.style.fontSize="40px";
//加粗
form1.select1.style.fontWeight="bold";-->
</script>
</html>
form1.select1.options[1].style.fontWeight="bold";
form1.select1.options[1].style.fontSize="20px"
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>select问题</title>
</head><body>
<form name="form1" method="post" action="">
<select name="select1" size="10">
<option value="a">aaaaaaa</option>
<option value="b">bbbbbbb</option>
<option value="c">ccccccc</option>
</select>
</form></body>
<script language="JavaScript">
<!--
//改变字体颜色(以下代码正确)
form1.select1.options[0].style.color="red";
//改变背景颜色(以下代码错误)
form1.select1.options[1].style.backgroundColor="green";
//改变大小
form1.select1.style.fontSize="40px";
//加粗
form1.select1.style.fontWeight="bold";
-->
</script>
</html>