作成中の登録フォームがあります。私のhtmlファイルには、2つのラジオボックスがあり、
<input type="radio" name="whatever" value="0" id="whatever" checked//> No
<input type="radio" name="whatever" value="1" id="whatever"> Yes
値が 1 の場合、ajax を使用してメールを送信する必要があります。
if($("input[name='whatever']").val()=='2'){
$.ajax({
type: 'POST',
url: base + 'email',
data: vData,
success: function() {
// alert( "I'm the callback")
}
});
}
助けてくれてありがとう。