FOLLOW US
In this sections, we will learn how to run a script (as an external file) from another JavaScript file.
Before we start, let us see more examples on adding script to html:
Another example
--------Create external JavaScript file with the extension .js.
--------After
creating, add it to the HTML file in the script tag.
--------The src attribute is used to include that
external JavaScript file.
---------If
you have more than one external JavaScript file, then add it in the same web
page to increase performance of the page.
•Example:
•Let’s
say you created the following new.js external JavaScript file:
Now add the external JavaScript file to the HTML web page:
So that
is how to call one script from another. Next, we will look at the types of DATA
YPES that are supported n JavaScript.
CONTINUE READING - SUPPORTED DATA TYPES IN JAVASCRIPTS
No comments:
Post a Comment