求教select的onchange事件改变文本框属性
求教:当下拉框选择a是,触发下面的文本框为不可改写状态(disabled),请问如何写onchange事件?
<select >
<option value= "10 " > a </option>
<option value= "11 " > b </option>
<option value= "12 " > c </option>
<option value= "13 " > d </option>
</select>
<input name= "na type= "text " disabled value= "e ">
------解决方案-------------------- <select onchange= "document.getElementById( 'inp ').disabled=this.options[selectedIndex].text== 'a '?true:false ">
<option value= "10 " > a </option>
<option value= "11 " > b </option>
<option value= "12 " > c </option>
<option value= "13 " > d </option>
</select>
<input name= "na " id= "inp " type= "text " disabled value= "e ">