the added screen shot shows the given error and the code written by me
1.If not working then right click on the .js file go to the properties.
2.You can see the “Location:” below copy the entire address of the .js file and place it in the
src: in the html file.
Add <Meta> tag with charset attribute in <head>.
Syntax for inline JS
Thank You all for your suggestions