HTML:
<input type="radio" name="timeformat" id="timeformat-a" value="am/pm" checked="checked" /> <b>am/pm</b>
<input type="radio" name="timeformat" id="timeformat-b" value="24 hours" /> <b>24 hours</b>
<select id="default-start-time" class="select check-list">
<option value="" label="--Select--">--Select--</option>
<option value="00:00" label="12:00 AM">12:00 AM</option>
<option value="00:30" label="12:30 AM">12:30 AM</option>
<option value="01:00" label="01:00 AM">01:00 AM</option>
<option value="01:30" label="01:30 AM">01:30 AM</option>
<option value="02:00" label="02:00 AM" selected>02:00 AM</option>
<option value="02:30" label="02:30 AM">02:30 AM</option>
</select>
当我选择 24 小时格式时,应显示选项值。
jQuery:
$("input[name='timeformat']").click(function() {
if($(this).val()=='24 hours')
{
// code which replaces label with the option value
}
});
jquery应该怎么看??