August 1999
Intermediate to advanced
1488 pages
72h 53m
English
void(expression) void expression
The void operator is used to evaluate an expression without returning a value. This operator returns undefined and is commonly used in place of the onClick event handler because of various bugs in early UNIX Navigator browsers. Note that Opera browsers do not support this operator.
In Listing 6.271, the void operator is used to keep an <A> link on a page from clicking through anywhere while still invoking the function specified.
<html> <head> <title>Listing 6.171: Examples of the void Operator</title> <script language="JavaScript"> <!–– Hide // Define ... |
Read now
Unlock full access