怎么用 javascript改变一个text的 背景颜色 <input id=text1 type=text><button onclick="text1.style.background='#FF0000'">Red</button> 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <script>function clickit(){ if(form1.select1.value==1){ form1.two.disabled=false; form1.three.disabled=false; form1.four.disabled=false; form1.five.disabled=false; form1.two.style.background = '#FFFFFF'; form1.three.style.background = 'FFFFFF'; form1.four.style.background = 'FFFFFF'; form1.five.style.background = 'FFFFFF'; } else{ form1.two.disabled=true; form1.three.disabled=true; form1.four.disabled=true; form1.five.disabled=true; form1.two.style.background = 'red'; form1.three.style.background = 'red'; form1.four.style.background = 'red'; form1.five.style.background = 'red'; }}</script><form name="form1"><select name="select1" onchange= "javascript:clickit()"><option value=1>one</option><option value=2>Two</option><option value=3>three</option><option value=4>four</option><option value=5>five</option></select><br/><br/><input type="text" id="one"><input type="text" id="two"><input type="text" id="three"><input type="text" id="four"><input type="text" id="five"></form> 这样的函数怎么调用啊,新手! 谁帮忙修复几个小问题。 怎样补齐空格,使总字符数为10 关于javascript获取当前对象的问题 按浏览器的刷新和地址栏回车有什么区别? RMVB 格式的文件怎么在线播放 JS 计算日期 *** 很菜问题, 急!!关于连接 <A></A>的处理问题 *** 关于字符串的问题 浮动帧[iframe]的使用问题,急? 能否把下拉表单的选项置为改动前的那个选项? 帮我看看这段代码为什么不能行?
function clickit(){
if(form1.select1.value==1){
form1.two.disabled=false;
form1.three.disabled=false;
form1.four.disabled=false;
form1.five.disabled=false;
form1.two.style.background = '#FFFFFF';
form1.three.style.background = 'FFFFFF';
form1.four.style.background = 'FFFFFF';
form1.five.style.background = 'FFFFFF';
}
else{
form1.two.disabled=true;
form1.three.disabled=true;
form1.four.disabled=true;
form1.five.disabled=true;
form1.two.style.background = 'red';
form1.three.style.background = 'red';
form1.four.style.background = 'red';
form1.five.style.background = 'red';
}
}</script>
<form name="form1">
<select name="select1" onchange= "javascript:clickit()">
<option value=1>one</option>
<option value=2>Two</option>
<option value=3>three</option>
<option value=4>four</option>
<option value=5>five</option>
</select><br/><br/>
<input type="text" id="one">
<input type="text" id="two">
<input type="text" id="three">
<input type="text" id="four">
<input type="text" id="five">
</form>