Add JavaScript Confirmation On HTML Link Click

To display a JavaScript Confirmation when click a link on HTML page, We can use  Inline event handler.

Inline event handler.

Within the most simple technique, you can utilize the confirm() function within an inline onclick handler.


<html>
<head>
<title>Link click confirm</title>
</head>
<body>
<a href="send.php?id=2352" onclick="return confirm('Are you sure?')">Link</a>
</body>
</html>

Share on Google Plus

About srimaster

Tech Dropper is simple, easy and newest technology source with experiments and demos. I will give you tutorials, notes, code snippets, demos using PHP, MySQL, jQuery, HTML, CSS, Ajax and Javascripts.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment