jquery val() 返回undefined的问题
jquery val() 返回undefined的问题.
alert($('#shipType>input[checked]').val());<td id="shipType"> <input type="radio" name="questinfo[ship]" value="1" onclick="checkQuestPay()" /> 24小时后收货 <input type="radio" name="questinfo[ship]" value="2" onclick="checkQuestPay()" checked /> 48小时后收货 <input type="radio" name="questinfo[ship]" value="3" onclick="checkQuestPay()" /> 72小时后收货 <input type="radio" name="questinfo[ship]" value="4" onclick="checkQuestPay()" /> 96小时后收货 <input type="radio" name="questinfo[ship]" value="0" onclick="checkQuestPay()" /> 立即收货(限虚拟宝贝)</span> </td>