1
2つのチェックボックスを使って検証を作成しました。2つの結果で同時に2つの検証を行う方法
両方の検証ではJavaScript
と正常に動作している私がお見せしましょう私のコード
javascipt
function Validation_agree(){
if(document.form1.agreed1.checked==false)
{
$(".agreement_main").show();
return false
}else{
$(".agreement_main").hide();
}
if(document.form1.agreed2.checked==false)
{
$(".agreement_terms").show();
return false
}else{
$(".agreement_terms").hide();
}
}
フォームは問題がつまり
<div class="checkme">
<label><input type="checkbox" value="" name="agreed1" />I have discussed all of the order details above and the customer is happy to proceed</label>
<br />
<div class="alert agreement_main" style="display:none;">Please confirm you have informed the customer of the T&Cs</div>
</div>
<div class="redNote">
<label><input type="checkbox" value="" name="agreed2" />I have informed the customer where they can find the T&C’s on the BT.com website</label></p>
<div class="alert agreement_terms" style="display:none;">Please confirm you have informed the customer of the T&Cs</div>
</div>
<input type="submit" value="submit order" /></div>
</form>
のようなものです。他の1つを焼き払って作業しています
最初の検証エラーメッセージが表示されます。私は、いずれかのコードの下に
私のアプリケーションの1つで同様の問題に直面しています:( – Muhammed
@maanu JQoneからの使用回答を使用できますが、正常に動作しています – Muhammed