Function with one argument

The user enters the URL then clicks the "Go!" button. The onClick event handler calls the function and passes the URL to it.

This example uses a programmer-defined function called webjump. The function is defined in the head section of the page. It has one argument -- the URL of the new Web page to open. (The comment hides the function definition from early Web clients that did not recognize Javascript).

Note that the programmer-defined function calls a built-in function called open. (It calls theopen method of the class window).

 

URL:  


Disclaimer: The views and opinions expressed on unofficial pages of California State University, Dominguez Hills faculty, staff or students are strictly those of the page authors. The content of these pages has not been reviewed or approved by California State University, Dominguez Hills.