选择否 工位框不可以输入
选择是 可以输入工位
1 <tr> 2 <td class="in-lab" width="15%">是否入驻场地:</td> 3 <td class="in-ctt" colspan="3"> 4 <c:if test="${bean.needplace==0}"> 5 <input type="radio" onclick="fun_needstationok(this)" name="needplace" 6 value="${bean.needplace}" />是 7 <input type="radio" onclick="fun_needstationc(this)" name="needplace" 8 checked="checked" value="${bean.needplace}" />否 9 <br/>需要工位数:<input type="text" id="needstation" name="needstation" value="${bean.needstation}" readonly="readonly" size="5"/>(工位) 10 </c:if> 11 12 <c:if test="${bean.needplace==1}"> 13 <input type="radio" onclick="fun_needstationok(this)" name="needplace" 14 value="${bean.needplace}" checked="checked"/>是 15 <input type="radio" onclick="fun_needstationc(this)" name="needplace" 16 value="${bean.needplace}" />否 17 <br/>需要工位数:<input type="text" id="needstation" name="needstation" value="${bean.needstation}" readonly="readonly" size="5"/>(工位) 18 </c:if> 19 </td> 20 </tr> 21 <script type="text/javascript"> 22 function fun_needstationok(obj){ 23 if(obj.checked){ 24 $('#needstation').attr('readonly',false); 25 } 26 } 27 function fun_needstationc(obj){ 28 if(obj.checked){ 29 $('#needstation').attr('value','0'); 30 $('#needstation').attr('readonly',true); 31 } 32 } 33 </script>