We have been using Internal JS so far. Here is a sample –
You plan to display the current date and time in all your web pages. Suppose you wrote the code and copied into all your web pages (say 100). But later, you want to change the format in which the date or time is displayed. In this case, you will have to make changes in all the 100 web pages. This will be a very time consuming and difficult task.
Note: It is assumed that the .js file and all your web pages are in the same folder. If the chúng tôi file is in a different folder, you need to specify the full path to your file in the src attribute.
This is your chúng tôi file. Don’t worry seeing long lines of code. You will learn to code soon. Make changes to your HTML document like this: