jump to last post 1-4 of 4 discussions (4 posts)

How to call javascript function

  1. HubPages profile image
    HubPagesposted 8 years ago

    How to call javascript function

  2. insanogil profile image52
    insanogilposted 8 years ago

    It's as simple as writing the name of the function. This website has a good example: http://www.webdevelopersnotes.com/tutor … tions.php3
    which I will reproduce below. The following code creates a function named alert_box():

    function alert_box()
       alert("I am displayed by a function");

    In order to call the function, you would simply write:


  3. s.p.a profile image34
    s.p.aposted 8 years ago
  4. dabeaner profile image55
    dabeanerposted 8 years ago

    Look at "View|Source" in your browser at different web pages to find examples.  Search (Ctrl+F) for instances of "javascript"

    For example, if you go to
    at the bottom you will see javascript calling statcounter.