我已将html链接到js文件。 验证以html格式提供 但不起作用 我在jquery中也有办法吗?
<form id="myDIV1" hidden >
<h1>Add Contact</h1>
<label for="name"></label>
Contact Name<br> <input type="text" name="name" id="name" placeholder="Full name" required />
<br />
<label for="company"></label>
Company Name<br><input type="text" name="company" placeholder="Company name" id="company" required />
<br />
<label for="email"></label>
Email <br><input type="text" name="email" id="email" placeholder="Email" pattern="/^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$/"required />
<br />
<label for="phone"></label>
Phone No<br><input type="text" id="phone" name="phone" pattern="/(7|8|9)\d{9}/"
placeholder="Phone no"
required>
<br />
<label for="remarks"></label>
Remarks<br><input type="text" name="remarks" id="remarks" placeholder="remarks" required />
<br />
<br><button type="button" class="btn btn-primary" id="add" onclick= "return Validate()">Save</button>
<button type="button" id="clear" class="btn btn-primary" >Clear</button>
<a href="">Cancel</a>
<br />
</form>