这是我的代码。即使我选择“是”,我得到的总是“不”这是我的 html 代码。在 firebug 控制台中进行测试时,它工作正常。我也尝试过 .each 函数,但它仍然没有任何价值。有时它需要正确的复选框值,但它会继续取该值几次
<form >
<table width="900" cellpadding="5" border="0" >
<tr>
<td width="30"><input type="radio" class="radio_bg" name="profile_rpt_bg" value="yes"></td>
<td>Repeat Background</td>
</tr>
<tr class="graybackgroundlight">
<td><input type="radio" name="profile_rpt_bg" class="radio_bg" checked="checked" value="no"></td>
<td>Do not Repeat Background</td>
</tr>
</table>
</form>
这是我的 JavaScript 代码
$(document).ready(function(){
$('#file_upload_bg').uploadify({
'formData' : {
'artist_id' : '<?php echo $artist_details['id']; ?>',
'username' : '<?php echo $artist_details['username'];?>',
'rpt': $("input[name='profile_rpt_bg']:checked").val(),
'column' : 'profile_bg'
},
'auto' : false,
'multi' : false,
'fileTypeDesc' : 'Image Files',
'fileTypeExts' : '*.jpg; *.png',
'swf' : 'uploadify.swf',
'uploader' : 'artist_uploadify.php' ,
'onUploadSuccess' : function(file, data, response)
{
alert(data);
$("#container").notify("create", {
title: 'Success',
text: file.name+' Uploaded with success'
});
}
// Your options here
}); //uploadify ends
});