JSFiddle - React, Tailwind, and code Playground

by Pradeep Shankar

HTML

<span id="samp">
    testing
    
</span>

<br/>
<br/>
<button id="confirm">click me</button>

JavaScript

var test = $("#samp").text();

alert(test);


$("#confirm").click(function () {
    var conf = confirm("Are you like to proceed" + test);

    if (conf) {
      alert("continues....");
    } else {
        return false;
    }
});