/ Published in: JavaScript
Ask the user with a confirmation dialog if the link should be followed or not.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function conf() { return confirm('Are you sure?'); } <a onclick='return conf()' href='http://example.com'>Link</a>