怎么实现留言js表单验证
<formmethod="post"name="contact"action="#"><divclass="col_w310float_l"><labelfor="aut...
<form method="post" name="contact" action="#">
<div class="col_w310 float_l">
<label for="author">姓名:</label> <input type="text" id="author" name="author" class="required" />
<div class="cleaner_h10"></div>
<label for="email">邮箱:</label> <input type="text" id="email" name="email" class="validate-email required" />
<div class="cleaner_h10"></div>
<label for="phone">手机号码:</label> <input type="text" name="phone" id="phone" />
<div class="cleaner_h10"></div>
</div>
<div class="col_w310 float_r">
<label for="text">留言内容:</label> <textarea id="text" name="text" rows="0" cols="0" class="required"></textarea>
<div class="cleaner_h10"></div>
<input type="submit" class="submit_btn float_l" name="submit" id="submit" value="提交" />
<input type="reset" class="submit_btn float_r" name="reset" id="reset" value="重置" />
</div>
</form>
姓名不超过4个字。邮箱要正确的邮箱。手机号码11位。留言内容不少于30字 展开
<div class="col_w310 float_l">
<label for="author">姓名:</label> <input type="text" id="author" name="author" class="required" />
<div class="cleaner_h10"></div>
<label for="email">邮箱:</label> <input type="text" id="email" name="email" class="validate-email required" />
<div class="cleaner_h10"></div>
<label for="phone">手机号码:</label> <input type="text" name="phone" id="phone" />
<div class="cleaner_h10"></div>
</div>
<div class="col_w310 float_r">
<label for="text">留言内容:</label> <textarea id="text" name="text" rows="0" cols="0" class="required"></textarea>
<div class="cleaner_h10"></div>
<input type="submit" class="submit_btn float_l" name="submit" id="submit" value="提交" />
<input type="reset" class="submit_btn float_r" name="reset" id="reset" value="重置" />
</div>
</form>
姓名不超过4个字。邮箱要正确的邮箱。手机号码11位。留言内容不少于30字 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询