Posted By

gummiost on 11/16/12


link confirm onclick

Versions (?)

Confirm onclick

 / Published in: JavaScript

Ask the user with a confirmation dialog if the link should be followed or not.

  1. function conf()
  2. {
  3. return confirm('Are you sure?');
  4. }
  6. <a onclick='return conf()' href=''>Link</a>

Report this snippet  

You need to login to post a comment.