我想验证此表单,但我无法验证这些单选按钮,请帮忙。并且还希望在某些字段错误时显示警报。
/ * 这里是 HTML 代码* /
<form id="regForm" action="/action_page.php">
<h1>Register:</h1>
<!-- One "tab" for each step in the form: -->
<div class="tab">Where do you want to move? *:
<p><label class="cont">Local
<input type="radio" name='thing' value='local' data-id="local">
<span class="checkmark"></span>
</label>
<label class="cont">Domestic
<input type="radio" name='thing' value='domestic' data-id="domestic">
<span class="checkmark"></span>
</label>
<label class="cont">International
<input type="radio" name='thing' value='international' data-id="international">
<span class="checkmark"></span>
</label>
</p>
</div>
<div class="tab">Name:
<div id="local" class="none">
<p>
<label class="cont">1 BHK Goods
<input type="radio" name='size' value='1 bhk'>
<span class="checkmark"></span>
</label>
<label class="cont">2 BHK Goods
<input type="radio" name='size' value='2 bhk'>
<span class="checkmark"></span>
</label>
<label class="cont">3 BHK Goods
<input type="radio" name='size' value='3 bhk'>
<span class="checkmark"></span>
</label>
<label class="cont">4 BHK/Villa Goods
<input type="radio" name='size' value='3 bhk'>
<span class="checkmark"></span>
</label>
白衣染霜花
相关分类