For example, you may want to update some content on your page without requiring the page to reload. A post-back adds additional delays and processing power on your webserver. This may not always be desirable or even necessary.
void() function and simply pass a parameter of 0 (zero).
In the following example, we will use an anchor link (hyperlink) and set the
href attribute to
ondblclick method just so you can actually see the results of clicking once versus clicking twice.
<a href="" ondblclick="alert('You clicked twice!')"> Double Click Me! </a>
Here is another example where we can use a hyperlink to update the value of a textbox.
These were just some simple examples. As you can now imagine, this technique can be very useful when you want to call another function without reloading the page. This technique helps greatly improve your visitors’ experience while on your website.