JavaScript is an interpreted language. You type the script in as part
of the HTML code for that
web page and the browser interprets that script (along with the HTML
tags) to produce a finished web page.
The HTML code that you type in is interpreted by the browser to produce
a web page. The same HTML code will always produce the same page: so,
generally speaking, to change the web page you have to change the underlying
HTML.
A piece of JavaScript, however, will allow you to change small parts
of the web page without having to change the HTML. This means that the
page can respond to the user without having to reload.
|