• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Part III: Appendixes > Executing JavaScript from HTML Links

E.6. Executing JavaScript from HTML Links

In most JavaScript-capable web browsers, it is possible to execute JavaScript statements from an anchor tag using the javascript: protocol as the value of the HREF attribute. For example:

<A HREF="javascript:square(5);">find the square of 5</A>


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint