Я использовал этот код, я также использовал AJAX на своей странице
$html.='<div><p id="question" name="qid">Q.'.$result['question_no'].': '.$result['question'].'</p></div>
<label style="padding-top:15px;">
A <span style="padding-left: 15px;"><input type="radio"';
if (isset($result['answer']) && $result['answer']==$result['choice1']) {
$html.= 'checked="checked"';
}
$html.=' name="answer" id="option" value='.$result['choice1'].'>'.$result['choice1'].'</span>
</label>
</div>
И часть jQuery
var answer = $("form input[type='radio']:checked").val();
alert(answer);
Значение содержит пробелы, такие как «первичный ключ», но я получил толькоосновной, как я могу получить значение с пробелами