Heim  >  Artikel  >  Web-Frontend  >  jquery input radion 选择_html/css_WEB-ITnose

jquery input radion 选择_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:25:08775Durchsuche

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>


如何通过点击使input选中?

回复讨论(解决方案)

$("tr").click(function(){    $(this).find("input[type='radio']").attr("checked",true);})

直接判断当点击tr里面所有的td都会选中单选按钮

$("tr").click(function(){    $(this).find("input[type='radio']").attr("checked",true);})

直接判断当点击tr里面所有的td都会选中单选按钮


感觉“迟钝”额...有时有用,有时点击没用。。。。


$("tr").click(function(){    $(this).find("input[type='radio']").attr("checked",true);})

直接判断当点击tr里面所有的td都会选中单选按钮


感觉“迟钝”额...有时有用,有时点击没用。。。。
不会吧, 你把你的html发过来我试一下



$("tr").click(function(){    $(this).find("input[type='radio']").attr("checked",true);})

直接判断当点击tr里面所有的td都会选中单选按钮


感觉“迟钝”额...有时有用,有时点击没用。。。。
不会吧, 你把你的html发过来我试一下


<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  页面


jsp页面你用if else包含td的话我不太清楚会不会有影响

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn