|
April 2, 2001 Using a Dummy URL Tips: April 2001
Yehuda Shiran, Ph.D.
|
|
Sometimes you want to prevent the browser from going to a URL that has been clicked. There are cases where all you want from the URL is to activate its side effects, such as an onClick() event handler. One way to avoid the URL from being activated is to write an empty JavaScript: command:
The link renders as:
This link is used only for its color People who read this tip also read these tips: Look for similar tips by subject: |