SyntaxFix
Write A Post
Hire A Developer
Questions
Just change the url to http://localhost instead of localhost. If you open the html file from local, you should create a local server to serve that html file, the simplest way is using Web Server for Chrome. That will fix the issue.
http://localhost
localhost
Web Server for Chrome