W3Schools Learner's Blog

w3Schools programming knowledge summary website

div

3/16/2018

"Uncaught SyntaxError: Unexpected token <" error

"Uncaught SyntaxError: Unexpected token <" error

i have a "Uncaught SyntaxError: Unexpected token <" error in html file header, as follows:






Later, it was found that the SyntaxError was caused by the error of the JS import path.
error js file path :
  1. <script type="text/javascript" src="/h-ui.admin/js/H-ui.admin.page.js"></script>
change as:
  1. <script type="text/javascript" src="/asset/static/h-ui.admin/js/H-ui.admin.page.js"></script>
perfect !

Note:
If you add the JS import path correctly, check to see if the undefined function is used.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.