このコードはトラベルフォームです。確認後にすべての入力フォームをリセットします(ラジオ、チェックボックス、テキスト)。 投稿する前にすべての入力フィールドにユーザーを入力させる方法を教えてください。 私があなたを助けてくれることを願っています。敬具。あなたが見ることができるお使いのリセット問題については確認後フォームをリセットする方法
$(document).ready(function() {
$('#submit').click(function() {
var a = $('#first').val();
var b = $('#last').val();
var c = $('#age').val();
var d = $('#male').val();
var e = $('input[name=radAnswer]:checked').attr('id');
var f = $('input[name=che1]:checked').attr('id');
var z = [];
if ($('#Vegetarian').is(':checked'))
z.push($('#Vegetarian').val());
if ($('#Kosher').is(':checked'))
z.push($('#Kosher').val());
if ($('#Masters').is(':checked'))
z.push($('#Masters').val());
$.confirm({
animation: 'news',
closeAnimation: 'news',
theme: 'supervan',
title: 'Confirm! Are you sure to Continue?',
content: "First name: " + " " +
a + "<br>" + "Last name: " + " " + b + "<br>" + "Age: " +
" " + c + "<br>" + "Gender: " + " " + e + "<br>" + "Traveling to: "
+ " " + f + "<br>" + "Food type: " + " " + z,
buttons: {
confirm: function() {
$.alert('Confirmed!<br><br>Kind Regards.');
},
cancel: function() {
$.alert('You Canceled!!!, Travel to Hell :)');
}
}
});
$( "#first")。 ); $( "#age"); document.getElementById( "Male")。checked = false;document.getElementById( "Female")。checked = false; document.getElementById( " "イスタンブール")。チェック= false; document.getElementById( "New York")。checked = false; document.getElementById( "Costa Rica")checked = false; document.getElementById( "Vegetarian")。checked = false; document.getElementById( "Kosher")。checked = false; document.getElementById( "マスター")。checked = false; –
ありがとうございました ありがとうございました。みんなありがとうございました。 –