Search
 
SCRIPT & CODE EXAMPLE
 

HTML

html link confirm

<a href="delete.php?id=22" onclick="return confirm('Are you sure?')">Link</a>

<!-- or -->
<a href="delete.php?id=22" class="confirmation">Link</a>
<script type="text/javascript">
    var elems = document.getElementsByClassName('confirmation');
    var confirmIt = function (e) {
        if (!confirm('Are you sure?')) e.preventDefault();
    };
    for (var i = 0, l = elems.length; i < l; i++) {
        elems[i].addEventListener('click', confirmIt, false);
    }
</script>
Comment

PREVIOUS NEXT
Code Example
Html :: ngfor display in html table 
Html :: dropdown calendar html 
Html :: fibonacci series in html 
Html :: block level elements 
Html :: html stands for 
Html :: embed github html 
Html :: how to change font colour in html 
Html :: doc.fromHTML is not a function 
Html :: accordion bootstrap 5 collapse not working 
Html :: bootstrap navbar simple 
Html :: create a link in md 
Html :: object htmldivelement to string 
Html :: innerhtml angular 
Html :: html5 datalist 
Html :: radio buttons 
Html :: Horizontal Scrolling Bopostrap 
Html :: typo3 typoscript page uid to body tag 
Html :: favicon x shortcut icon 
Html :: how to download file html button 
Html :: shopify custom html image tag src attribute 
Html :: html definition list 
Html :: html video multiple elements 
Html :: how to make a div responsive in css 
Html :: superscript in html 
Html :: bootstrap tablist 
Html :: add map in html 
Html :: modal pop up html css 
Html :: html form using http 
Html :: range slider in html 
Html :: simple html dom 
ADD CONTENT
Topic
Content
Source link
Name
5+2 =