0

javascript:delete_reply_notify('14557174');void(0)

it make javascript delete one row which id = 1455174

but ,why is void(0)? what's mean ?

coolpest
  • 23
  • 2

3 Answers3

1

Its to prevent the default behaviour of the link from being activated, namely redirecting the browser to a new page. Your example though shows poor JavaScript practice - you should look into coding things unobtrusively and into the use of progressive enhancement

robjmills
  • 18,129
  • 15
  • 73
  • 119
0

To prevent the page reloading upon a single click, we can use JavaScript:void(0); within the anchor link.

Reigel
  • 62,834
  • 21
  • 119
  • 135
0

stops the link activating. Best to avoid the javascript protocol if possible better to use the click event.

matpol
  • 3,012
  • 1
  • 14
  • 17