Heim >Web-Frontend >HTML-Tutorial >jquery input radion 选择_html/css_WEB-ITnose
jquery input
<table><tr><td><input type="radion" class="check"></td><td>1111111</td><td>111111111</td><td>1111111111</td><td>11111111111</td></tr></table>
$("tr").click(function(){ $(this).find("input[type='radio']").attr("checked",true);})
$("tr").click(function(){ $(this).find("input[type='radio']").attr("checked",true);})
$("tr").click(function(){ $(this).find("input[type='radio']").attr("checked",true);})
$("tr").click(function(){ $(this).find("input[type='radio']").attr("checked",true);})
<table id="t1"> <tr> </tr> <s:iterator value="#session.address_list" var="address" status="s"> <tr id="confirm_address"> <s:if test="#address.isdefaultaddress==1"> <td style="width: 10px;"><input type="radio" class="check" value="<s:property value="#address.id" />" name="addressid" checked="checked"></td> </s:if> <s:else> <td style="width: 10px;"><input type="radio" class="check" value="<s:property value="#address.id" />" name="addressid"></td> </s:else> <td style="width: 250px;"><s:property value="#address.Address" /></td> <td><s:property value="#address.consigneeName" /></td> <td><s:property value="#address.mobileTel" /></td> <td><s:property value="#address.lineTel" /></td> <td><s:property value="#address.PostalCode" /></td> </tr> </s:iterator> </table>
jsp页面你用if else包含td的话我不太清楚会不会有影响