I am fairly new to JS, trying to set up a document which would use two scripts, in separate files. One js would generate initial content on the page, another would define the page behavior.
For example, first script should generate a blue box with the word “Blue” inside it.
Second script, should change the color and word to green.
I am not sure how to integrate the scripts into the HTML? Do I specify something in the style block? How to I link files together and how do I use XML events?
You can have as js in one file or even embedded within HTML.
Also regarding first part Initialising you can call js function like this which executes as the browser encounters it…
And the other function can be called on event such as click or timeout.
You can include 1 or mor js files in a web page.