HTML:
<div class="rButtons">
<input type="radio" name="numbers" value="10" onclick="uncheck();" />10
<input type="radio" name="numbers" value="20" onclick="uncheck();" />20
<input type="radio" name="numbers" value="other" onchange="blahblahblah();"/>other
<input type="text" id="other_field" name="other_field" onblur="checktext(this);"/>
</div>
CSS:
<style type="text/css">
#other_field{
visibility: hidden;
width:40px;
height:14px;
border:1px solid #777;
background-color:#111;
font-size:10px;
color:#666;
}
</style>
jQuery:
<script>
function blahblahblah()
{
var $radios = $('input:radio[name=numbers]');
if ($radios.is(':checked') === true) {
$("#other_field").show();
}
else
{
$("#other_field").hide();
}
}
</script>
一切都很好..但问题是这个..当我点击“其他”单选按钮时没有任何反应..虽然它应该打开其他字段。