Hi, I have coded one HTML file name file1.html and one Javascript file program.js and try to invoke the javascript file in the HTML file. But it failed to invoke. Did i do any mistake ? Please help to let me know.
I have only those two files with only those code. Is there any mistake in my codes ? The browser shows only "Javascript " without changing any color to red.
Huh? How come? I’ve copied and pasted your code and that’s the only part that I’ve changed.
Are you sure your JS file is being loaded? Just for kicks, try adding console.log('hello'); at the very top of your JS file, then reload and check your browser’s console.
Or move the <script> tag (the one that points to your JS file) right before the closing </body> tag.
Actually I found that my console was invoking a previous version file and was not updating the corrections. Your suggestion for using the console in chrome help me track the file and i could run the updated file.