March 11, 2000 - Bookmarklet Foundations
March 11, 2000|
Tips: March 2000
Yehuda Shiran, Ph.D.
Now enter a two-statement URL:
As you can see, it is possible to enter multiple statements after the preceding
Simply click the following link, and an alert box will appear:
alert() method doesn't return a value; in other words, it returns undefined. If the statement returns undefined, the browser simply executes it. However, if it returns an explicit value, the browser loads a new page, with the
The void operator evaluates its expression, and returns undefined. The parentheses surrounding the expression are optional, but they are important when writing compact, one-line scripts. If you're not sure if a statement returns a value, use the void operator to stay on the safe side.
Note that the entire