0
私は3つのセクションを持ち、各セクションには必要なバリデーションが入力されています。ボタンをクリックすると、有効な検証が行われません。第1セクションは第2セクションに、検証は不要です。これで私を助けてください。バリデーションがHTMLで動作しない
<!doctype html>
<html>
<head>
<style>
.m-div {display: none;}
.m-div.current {
display: block;
}
</style>
</head>
<body>
<form action="" method="post">
<section class="m-div current" id="one" >
<input type="checkbox" name="bklet" required/>
<label for="bklet"> check it</label>
</section>
<section class="m-div" id="two">
<label> First Name</label>
<input type="text" name="Fname" pattern=".{3,}" title="3 characters minimum" class="input width-full" required>
<label> Last Name</label>
<input type="text" name="Lname" pattern=".{3,}" title="3 characters minimum" class="input width-full" required>
</section>
<section class="m-div" id="three">
<label> Your Message</label>
<textarea class="textarea width-full" name="message" required></textarea>
</section>
<input type="submit" onclick="next();">
</form>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script>
function next() {
var current = $('.current');
var next = current.next('.m-div:first');
// loop back to the first div
// if(next.length == 0) { next = $('#one'); }
current.removeClass('current');
next.addClass('current');
}
</script>
</body>
</html>
ここに*正確には?* –
私のここで確認してください:http://stackoverflow.com/questions/37321862/change-the-contact-forms-html-after-validation-and-mail-sent/37322045#37322045 –
申し訳ありません。MR.Fred、私の質問を変更しました –