Calling JavaScript in an Anchor Tag

There are many ways to call a JavaScript function in an HTML document. One way is inside an anchor tag. Any function that is listed in the portion of the document can be called within an anchor, and the anchor tag can refer to either text or an image.

 Test

This technique doesn’t rely on any event handlers such as onMouseover or onClick, which may behave differently in different browsers and browser versions.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

Recent Articles: