_:n2efd942b992848238143629a94856bdexb2
<http://schema.org/text>
" <p>You can call Confirmation box by simply add <code>onclick</code> event handler in a href(anchor ), so your code will be something like this</p> <pre class='x_language-markup'><code>&lt;a href=&quot;/Mpa/Orders/DeleteQuote/22&quot; class=&quot;btn btn-danger&quot; onclick=&quot;return confirm('Are you sure, you want to delete it?')&quot;&gt;Delete Quote&lt;/a&gt; </code></pre> <p>If user clicks on &quot;OK&quot; then only href=&quot;url&quot; will be called.</p> <h3>Confirm Using SweetAlert</h3> <pre class='x_language-javascript'><code>swal(&quot;Click on either the button or outside the modal.&quot;) .then((value) =&gt; {   swal(`The returned value is: ${value}`); });</code></pre> <p>Fiddle link: <a href='https://jsfiddle.net/90L124n8/' rel='nofollow noopener noreferrer'> https://jsfiddle.net/90L124n8/</a></p> <p>You need to include these CDN links</p> <pre class='x_language-javascript'><code>&lt;script src=&quot;https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js&quot;&gt;&lt;/script&gt; &lt;script src=&quot;https://cdnjs.cloudflare.com/ajax/libs/sweetalert/2.1.2/sweetalert.min.js&quot; &gt;&lt;/script&gt;</code></pre> "
<https://qawithexperts.com/questions/124/how-to-show-confirm-box-when-clicking-link-a-href-tag>