<p>I could only find the function <code>confirm()</code> that gives OK/Cancel buttons. Is there any way to give Yes/No buttons?</p>

[{'answer_id': 19284, 'author': 'FlySwat', 'author_id': 1965, 'author_profile': 'https://Stackoverflow.com/users/1965', 'pm_score': 2, 'selected': False, 'text': '<p>No.</p>\n\n<p>Instead you could use a in browser modal popup.</p>\n'}, {'answer_id': 19290, 'author': 'Cade', 'author_id': 565, 'author_profile': 'https://Stackoverflow.com/users/565', 'pm_score': 4, 'selected': True, 'text': '<p>Javascript offers 3 modal boxes.  <code>prompt</code>, <code>confirm</code> and <code>alert</code>.  None of those satisfy your request.  </p>\n\n<p>There are a plethora of js modal popup solutions.  Here\'s an example.</p>\n\n<ul>\n<li><a href="https://github.com/okonet/modalbox" rel="nofollow noreferrer">ModalBox</a></li>\n</ul>\n'}, {'answer_id': 19293, 'author': 'ejack', 'author_id': 1377, 'author_profile': 'https://Stackoverflow.com/users/1377', 'pm_score': 1, 'selected': False, 'text': '<p>No, but there are JavaScript libraries that can accomplish this for you. Just as an example, <a href="http://extjs.com/" rel="nofollow noreferrer">Ext JS</a> can be used to create a <a href="http://extjs.com/deploy/dev/examples/message-box/msg-box.html" rel="nofollow noreferrer">message box dialog</a>.</p>\n'}, {'answer_id': 19307, 'author': 'travis', 'author_id': 1414, 'author_profile': 'https://Stackoverflow.com/users/1414', 'pm_score': 2, 'selected': False, 'text': '<p>Like everyone else above says, you\'re stuck with OK/Cancel using <code>confirm()</code>.</p>\n\n<p>I would like to recommend this <a href="http://jquery.com/" rel="nofollow noreferrer">jQuery</a> plugin though: <a href="http://dev.iceburg.net/jquery/jqModal/" rel="nofollow noreferrer">jqModal</a>. I\'ve used it on 3 recent projects and it has worked great for each one. Specifically check out this example:</p>\n\n<blockquote>\n  <p>6). FUN! Overrides -- a. view (alert), b. view (confirm) It is now time to\n  show a real-world use for jqModal --\n  overriding the standard alert() and\n  confirm dialogs! Note; due to the\n  single threaded nature of javascript,\n  the confirm() function must be passed\n  a callback -- it does NOT return\n  true/false.</p>\n</blockquote>\n'}, {'answer_id': 22914957, 'author': 'mason', 'author_id': 1139830, 'author_profile': 'https://Stackoverflow.com/users/1139830', 'pm_score': 1, 'selected': False, 'text': '<p>I\'m a fan of <a href="https://jqueryui.com/dialog/#modal-confirmation" rel="nofollow">jQuery UI Dialog</a> for this sort of thing. Here\'s a sample...</p>\n\n<pre><code>&lt;script&gt;\n  $(function() {\n    $( "#dialog-confirm" ).dialog({\n      resizable: false,\n      height:140,\n      modal: true,\n      buttons: {\n        "Yes": function() {\n          $( this ).dialog( "close" );\n          alert("You chose Yes!");\n        },\n        "No": function() {\n          $( this ).dialog( "close" );\n          alert("You chose No!");\n        }\n      }\n    });\n  });\n  &lt;/script&gt;\n\n&lt;div id="dialog-confirm" title="Are you sure you want to continue?"&gt;\n  &lt;p&gt;&lt;span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"&gt;&lt;/span&gt;These items will be permanently deleted and cannot be recovered. Are you sure?&lt;/p&gt;\n&lt;/div&gt;\n</code></pre>\n'}, {'answer_id': 38184570, 'author': 'Shree', 'author_id': 5698411, 'author_profile': 'https://Stackoverflow.com/users/5698411', 'pm_score': 0, 'selected': False, 'text': '<p>Use dialog box to display yes or no</p>\n\n<pre><code>           &lt;div id="dialog_box" class="mnk-modal-bg" style="display:none"&gt;\n              &lt;div id="dbg" class="mnk-modal-box"&gt;\n                &lt;i class="uk-icon-exclamation-triangle"  style="color:#757575; padding-right:5px;"&gt;\n                &lt;/i&gt;Confirm?\n                &lt;div class="uk-text-center" style="margin-top:10px;"&gt;\n                    &lt;button class="md-btn md-btn-small md-btn-primary" id="ok_btn"&gt;\n                        &lt;i class="uk-icon-save" style="padding-right:3px;"&gt;&lt;/i&gt;OK\n                    &lt;/button&gt;\n                    &lt;button class="md-btn md-btn-small md-btn-danger" id="close_btn"&gt;\n                        &lt;i class="uk-icon-remove" style="padding-right:3px;"&gt;&lt;/i&gt;Cancel\n                    &lt;/button&gt;\n                &lt;/div&gt;\n            &lt;/div&gt;\n</code></pre>\n\n<p></p>\n\n<pre><code>&lt;script&gt;\n    $("#ok_btn").click(function(){\n        alert("OK");\n        $("#dialog_box").hide();\n    });\n    $("#close_btn").click(function(){\n       alert("CANCEL");\n       $("#dialog_box").hide();\n    });\n&lt;/script&gt;\n</code></pre>\n'}, {'answer_id': 48141559, 'author': 'Ewomazino Ukah', 'author_id': 5746074, 'author_profile': 'https://Stackoverflow.com/users/5746074', 'pm_score': 1, 'selected': False, 'text': '<p>i would use sweetalert <a href="https://sweetalert.js.org/guides/" rel="nofollow noreferrer">https://sweetalert.js.org/guides/</a> to achieve something like this </p>\n\n<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">\r\n<div class="snippet-code">\r\n<pre class="snippet-code-js lang-js prettyprint-override"><code>swal("Are you sure you want to do this?", {\r\n  buttons: ["yes", "no"],\r\n});</code></pre>\r\n<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"&gt;&lt;/script&gt;</code></pre>\r\n</div>\r\n</div>\r\n</p>\n'}]
['https://Stackoverflow.com/questions/19280', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/184/']