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,438
  • 15
  • 77
  • 121
0

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

Reigel Gallarde
  • 64,198
  • 21
  • 121
  • 139
0

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

matpol
  • 3,042
  • 1
  • 15
  • 18