怎么用 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> 谁能提供一个jquery ajaxupload PHP完整实例 javacript 创建xml? Jquery怎么写这个公共验证方法?急!!! window.onresize在frame中失效,求助高手 select 取值 js中的对象变成数组,有这样的函数吗?有的话能给个现成代码吗?(要求:不能用递归解决) 如何把这2段代码合成1断? 求个正则表达式 大家帮我看看这段代码有什么错误 如何实现submit到javascrip处理后再提交到form。 能否把下拉表单的选项置为改动前的那个选项? 帮我看看这段代码为什么不能行?
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>