Thursday, January 1, 2015

[Javascript][Resolved] Stray start tag script

To stop the problem, thing to do is move your script which are outside </body> or </html> tags to somewhere within the <body> or <head> tag. There is the example:

Incorrect example:
<!DOCTYPE html>
<html>
<head></head>
<body>
</body>
</html>
<script type="text/javascript" src="http://www.yyy.com/projects/tools/js/getyear.js"></script>

Move the script within body tab
 <!DOCTYPE html>
<html>
<head></head>
<body>
<script type="text/javascript" src="http://www.yyy.com/projects/tools/js/getyear.js"></script>
</body>
</html>

Or move the script with head tag:
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://www.yyy.com/projects/tools/js/getyear.js"></script>
</head>
<body></body>
</html>

Reference
http://stackoverflow.com/questions/19958667/stray-start-tag-script

No comments :

Post a Comment