I have select box and when the options change it shows another select box and it works fine however I want to have radio button show instead of selectbox. 有人可以帮我吗?
.sub{display:none;}
<script type="text/javascript">
var $sub = $('select.sub');
$('select').first().change(function () {
$sub.hide();
if (this.selectedIndex > 0)
$sub.eq(this.selectedIndex - 1).show();
}).change();
</script>
<select><--!main select box--!>
<option value="">select</option>
<option> one</option>
<option> two </option>
</select>
<select class="sub">
<option> one 1</option>
<option> one 2</option
</select>
<select class="sub">
<option> two 1</option>
<option> two 2</option>
</select>
这是我需要的,而不是上面的两个选择框....
<div class="sub">
<input type="radio">one 1
<input type="radio">one 2
</div>
<div class="sub">
<input type="radio">two 1
<input type="radio">two 2
</div>