<select name=t2 onchange="sub()">
<option value='1'>1</option>
<option value='2'>其他</option>
</select>
<input type=text name=t1 value=hehe id=t1>
<script>
function sub(){ var chart=document.getElementById('t1');
var svalue = chart.options[chart.selectedIndex].value; if(svalue == "2"){
chart.disabled=true;
}
}
</script>
<option value='1'>1</option>
<option value='2'>其他</option>
</select>
<input type=text name=t1 value=hehe id=t1>
<script>
function sub(){ var chart=document.getElementById('t1');
var svalue = chart.options[chart.selectedIndex].value; if(svalue == "2"){
chart.disabled=true;
}
}
</script>
<option value='1'>1</option>
<option value='2'>其他</option>
</select>
<input type=text name=t1 value=hehe id=t1>
<script>
function sub(){ var chart=document.getElementById('t2');
var svalue = chart.options[chart.selectedIndex].value; if(svalue == "2"){
document.getElementById('t1').disabled=true;
}
}
<option value='1'>1</option>
<option value='2'>其他</option>
</select>
<input type=text name=t1 value=hehe id=t1>
<script>
function sub(){ var chart=document.getElementById('t2');
var svalue = chart.options[chart.selectedIndex].value; if(svalue == "2"){
document.getElementById('t1').disabled=true;
}
else
document.getElementById('t1').disabled=false;
}
</script>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!--
function disableInput(oSel) { if (oSel.options[oSel.selectedIndex].text=="其他") { document.all.textId0.disabled = true;
document.all.textId1.disabled = true;
document.all.textId2.disabled = true; }
}
//-->
</SCRIPT>
<BODY>
<select onchange='disableInput(this)'>
<option>1</option>
<option>2</option>
<option>3</option>
<option>其他</option>
</select>
<INPUT TYPE="text" NAME="" id='textId0'>
<INPUT TYPE="text" NAME="" id='textId1'>
<INPUT TYPE="text" NAME="" id='textId2'>
</BODY>
</HTML>
<option value='1'>1</option>
<option value='2'>其他</option>
</select>
<input type=text name=t1 value=hehe id=t1>
<input type=text name=t4 value=hehe id=t4>
<input type=text name=t5 value=hehe id=t5>
<script>
function sub(){ var chart=document.getElementById('t2');
var svalue = chart.options[chart.selectedIndex].value; if(svalue == "2"){
document.getElementById('t1').disabled=true;
document.getElementById('t4').disabled=true;
document.getElementById('t5').disabled=true;
}
else{
document.getElementById('t1').disabled=false;
document.getElementById('t4').disabled=false;
document.getElementById('t5').disabled=false;
}
}
</script>