1. 程式人生 > >JSP頁面使用Jquery.validate時不起作用的方法

JSP頁面使用Jquery.validate時不起作用的方法

今天在jsp頁面使用jquery.validate.js校驗表單時,始終不起作用,找了大半天終於搞定了。。

form標籤旁邊顯示Invalid location of tag,在網上查了下,還是無果,仔細看了之後,發現form表單寫在了<table>中,

鬱悶呀,把form拿出來之後,不再報錯了,校驗功能也起作用了。。微笑

總結:

1. Invalid location of tag (form)
  form 應該寫到table外面去,並且form標籤裡面也不能套form標籤。
<style></style>
2. Invalid location of tag (style)
  style應該寫在head裡面。
<script></script>
3. Invalid location of tag (script)
  script應該寫到body,head裡面。