My webpage dosent show js script!

i have made 2 separate code as as follows 1)code for HTML save with my-webpage.html
2)js code for javascript save with
save them both in same folder . but still i am not getting the rrodesire output.
opened my html code in web browser (GOOGLE CHROME)and then right clicked it and selected inspect and then console. but it showing me this message "fail to load resource: net::ERR_FILE_NOT_FOUND!

i am getting a similar message when i try to manipulate HTML content using JS:-
please have a look

You need to create a function from the javascript file.The code is:
function myFunction(myName) {
var elem = document.getElementById(“hello”);
elem.innerHTML = elem.innerHTML + myName;
And make the extension as .js

1 Like

Hi @pathak.shreyas.s

Read the first answer on this question

You have created JavaScript file with name my-javascriptt. It does not have any .js extension . Your file name should be my-javascript.js

Do let me know in case you need any other information.

1 Like