<html:radio>/<html:select> 默认选中
<html:radio>
<tr><td width="30%" value="1">咨询</html:radio> <html:radio property="sendType" value="2" >办件</html:radio> <html:radio property="sendType" value="3">联办</html:radio></td></tr>
<tr> <td width="30%" styleonfocus="style.backgroundColor='#e0f4ff'" onblur="style.backgroundColor='#fff'"> <html:option value="办件">办件</html:option> <html:option value="咨询">咨询</html:option> <html:option value="联办">联办</html:option> </html:select> </td> </tr>
public ActionForward getSendNo(ActionMapping mapping, ActionForm form,HttpServletRequest request, HttpServletResponse response)throws Exception { ....SendNoForm send = (SendNoForm) form;send.setSendType("2"); ...... return mapping.findForward("sendNo");}
var temp =''; var free = document.getElementsByName("caseBean.configFee") for(var i = 0;i<free.length;i++){ if(free[i].checked) temp = free[i].value; }
<tr ><td value="0" >是</html:radio><html:radio property="caseBean.configFee" value="1" >否</html:radio></td><td maxlength="15"styleonfocus="style.backgroundColor='#e0f4ff'" onblur="style.backgroundColor='#fff'"/></td></tr>
if(document.getElementById("caseBean.caseSMSFlag").checked) { document.getElementById("caseBean.caseSMSFlag").value='是'; if(document.getElementById("caseBean.caseMobile").value==""){ alert("告知号码不能为空"); document.getElementById("caseBean.caseMobile").focus(); return false; }
<html:checkbox property="caseBean.caseSMSFlag" value="是"/>
function test(){var ifAdopt = document.getElementById("ifAdopt").value;if(ifAdopt == 3){document.getElementById('adoptType').selectedIndex = 0;document.getElementById("adoptType").disabled="true";}else{document.getElementById("adoptType").disabled="";}}
<td width="20%"><div align="right"><span style="color: red;">*</span>采纳类型</div></td><td width="15%"><html:select property="ifAdopt" styleId="ifAdoptID" onchange="aaa();"><html:option value="">--请选择--</html:option><html:option value="1">采用</html:option><html:option value="2">部分采用</html:option><html:option value="3">不予采用</html:option></html:select></td><td width="20%"><div align="right"><span style="color: red;">*</span>采用类型:</div></td><td width="15%"><html:select property="adoptType" styleId="adoptType"><html:option value="-1">--请选择--</html:option><html:option value="1">媒体采用</html:option><html:option value="2">信息摘编</html:option><html:option value="9">其它</html:option></html:select></td>