- where to write the code?
2.how to save it with.js
3 when i save it with .js it dosent open with browser
4 please help me i am not uderstanding it by reading
i have gone throught it several times but still havent figured it out .
1st open your text editor and click on open and select a new file
than press control+s and than save it with file name .js
after that open your .html file using browser
Hope this information is useful for you
1.Write your Java Code in the sublime text editor only.
2.Go to save as>>save it with filename.js.
Eg:Adding a variable or using a function.
keep going, my buddy. !!
thanks for your reply. but which html file ? i wrote the code and saved it with extension as .js !!! then which html file you are talking about ?
thanks a lot kunjan i will surely try it !!
Thanks a lot!! i understood the first 2 steps of your reply . but i didnt get the 3rd step !! can you please elaborate !! sorry .
The steps is as follows.
- First you will create a html file for example index.html.
- And then you open your html file in browser. (Chrome, Mozila Firefox etc.)
then your index.html will have the below code.
Do let me know in case you need any other information.
i tried it i am not getting this message on my web page !!
my HTML FILE NAME :-INDEX.HTML
i have saved both codes in same folder
- when i open my web site its not showing this message
Sorry i forgot to close
<script> tag in html. I am editing the html code in the previous message.
OK NO ISSUE . please send me the update code again
its the same code !! what the diffrence ?
Check this link in your code
you have to make 2 files. one is .js file and second is .html file
and you have to run the .html file in browser for see your webpage.
Hope this information is useful for you.
i have made 2 separate codes as follows 1)code for HTML save with my-webpage.html
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