spring mvc - Why for loop on jquery is not working on thymeleaf? -


i beginner in thymeleaf.

in spring project , using thymeleaf. loop not working. code:

<script th:inline="javascript">   $(document).ready(function(){       var page = $("#page").val();        for(var i=1;i< page;i++){          }      });   </script> 

without loop working , after adding - shows error:

org.thymeleaf.exceptions.templateinputexception: exception parsing document: template="householdlist", line 78 - column 18

where problem?

try this:

<script th:inline="javascript">   /*<![cdata[*/   $(document).ready(function(){     var page = $("#page").val();     for(var i=1;i< page;i++){      }   });   /*]]>*/ </script> 

Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -