This example shows Javascript code inside the value of the "onclick" attribute of an <a> element.
Once you click this link, the Javascript code in the onclick attribute of the anchor is evaluated by the browser.
Notice that the "alert" box shows up only after you click the link. As far as the browser is concerned, your click is an "event", and this type of Javascript code that responds to a particular type of event is known as an "event handler".