我在 Firefox/Firebug 中收到以下错误,但在 Safari 中没有。
$("input[name='how_many']:checked").val 不是函数
代码如下:
$(document).ready(function(){
$("#message-form").change(function(){
var selectedRadio = $("input[name='how_many']:checked").val();
if(selectedRadio == "some")
{
$("#conditional").fadeIn("slow");
}else{
$("#conditional").fadeOut("slow");
};
});
});