关于select的问题~
关于标签 <select id= "xx " name= "xx " onChange= "javascript:xx(); ">
<option class= "selectColor1 " value= "F5D6D7 " > Select Country </option>
<option class= "selectColor2 " value= "D4DFFA "> other </option>
</select>
<script language= "javascript ">
function xxfu()
{
var selects=document.getElementById( 'xx ').value;
document.getElementById( 'newId ').style.background = '# '+selects;
}
</script>
为什么改变select的时候,,,newid没有什么反映呢。。。
------解决方案--------------------用backgroundColor
------解决方案-------------------- <select id= "xx " name= "xx " onchange= "xxfu() ">
<option class= "selectColor1 " value= "F5D6D7 " > Select Country </option>
<option class= "selectColor2 " value= "D4DFFA "> other </option>
</select>
<TABLE id=newId>
<TR>
<TD> 去we </TD>
<TD> </TD>
</TR>
<TR>
<TD> 去we </TD>
<TD> 去we </TD>
</TR>
</TABLE>
<script language= "javascript ">
function xxfu()
{
var selects=document.getElementById( 'xx ').value;
document.getElementById( 'newId ').style.background = '# '+selects;
}
</script>
------解决方案-------------------- <html>
<head>
<title> </title>
<script language= "javascript ">
function xxfu()
{
var selects=document.getElementById( 'xx ').value;
document.getElementById( 'newId ').style.background = '# '+selects;
}
</script>
</head>
<body>
<select id= "xx " name= "xx " onChange= 'xxfu() '>
<option class= "selectColor1 " value= "F5D6D7 " > 请选择 </option>
<option class= "selectColor1 " value= "F5D6D7 " > Select Country </option>
<option class= "selectColor2 " value= "D4DFFA "> other </option>
</select>
<input type = 'text ' id = 'newId '>
</body>
</html>
没找到你说的 "newId " 自己加了一个text