【发布时间】:2012-02-19 02:47:16
【问题描述】:
我想隐藏/显示基于无线电选择的 div。
-在页面加载时隐藏 div 并选择单选“是”。
-如果用户选择单选“否”,则会出现 div。
-如果用户再次选择“是”,则 div 将再次隐藏。
谁能告诉我这是如何工作的?
html:
<table width="450px" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="200px" style="padding-top:3px; padding-left:3px;"><strong>Deliver Immediately?</strong>
<input type="radio" name="imm" id="delivernow" checked="true" />Yes
<input type="radio" name="imm" id="deliverlater" />No
</td>
<td width="140px">
<div name="datediv">
<label for="date">Select date:</label>
<input type="Text" id="date" maxlength="25" size="25"/>
<img src="images/cal.gif" onclick="javascript:NewCssCal('date','ddMMyyyy','arrow',true,'12','','future')" style="cursor:pointer"/>
</div>
</td>
</tr>
</table
【问题讨论】:
标签: javascript jquery html radio-button