これは私のコードです。「はい」を選択しても、常に「いいえ」が表示されます これは私の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
});