JSFiddle - React, Tailwind, and code Playground

by lollero

HTML

<a href="www.google.com">google</a>

JavaScript

$(function(){

    $('a').on('click', function() {
    
        var leaving = $(window).prompt("Are you sure you want to leave?");

        alert( leaving );
    
    });


});