<A HREF="http://www.webdevelopersnotes.com" onmouseover="alert('Go back to Home Page')"> Home Page</A>
Here we have an anchor tag that surrounds some text (‘Home page’). Don’t worry if you can’t understand the code (you are not supposed to at this stage). Just take a note of how the code is embedded inside the anchor tag. onmouseover is an event handler and as its name suggests, it manages a mouse over action. In this case, onmouseover event handler triggers some response whenever the user moves the mouse cursor over the text enclosed between the anchor tags.
There are three main advantages in using this technique. Firstly, you don’t need to place the code in all HTML documents, secondly, if a change is required you have to modify only one file instead of several and thirdly, it protects (though partly!) precious code. However, the main disadvantage is that the server has to locate and open one more file.
Equipped with this basic knowledge, let’s move towards creating your first script.
The first message over the Internet (actually it's predecessor, ARPANET) was the word "login" on October 29, 1969. Should we celebrate Internet birthday on this day? [more...]