jquery.validate.js不工作?

时间:2012-07-12 12:08:57

标签: jquery validation

我不明白我在这里做错了什么: http://adam-sites-for-clients.info/set-up/

我用这个: http://docs.jquery.com/Plugins/Validation

我的代码是:

<script type="text/javascript">
$("#myForm").validate();
</script>

思想???

1 个答案:

答案 0 :(得分:1)

删除表单并将其粘贴到:

<form class="optin" method="post" action="submit.php" id="myForm">
  <label for="name" class="label"><img src="images/label1.png" alt="" /></label>
  <input type="text" name="name" class="textbox required" id="name" />
  <label for="phone" class="label move"><img src="images/label2.png" alt="" /></label>
  <input type="text" name="phone" class="textbox required" id="phone" />
  <label for="email" class="label move"><img src="images/label3.png" alt="" /></label>
  <input type="text" name="email" class="textbox required email" id="email" />
  <input type="submit" class="submit" name="submit" value="" />
  <input id="topic" type="hidden" name="topic" value="homepage">
</form>

...然后阅读文档,然后从那里开始。

请注意我添加到<input>元素的类?