javascript confirmation box with yes no buttons





If that delete button is pressed, a message box should appear asking if the user is sure to delete the record.There is no Javascript function that uses Yes and No buttons so confirm() is as close as you can get. There is not direct option in JavaScript to get Yes/No buttons in a Confirm dialog. But, we can create a customized dialog box with our own HTML tags, controls and scripts and show it as a confirmation dialog using window.showModalDialog() function. I have a requirement that requires a confirm box with yes No buttons. Small JavaScript Alert Confirm Dialog Replacement Custom to customize via CSS and JavaScript. But first create a div (lets say the div id is idconfrmdiv) with the confirmation text and two buttons. This question already has an answer here: Javascript Confirm popup Yes, No button instead of OK and Cancel 8 answers Below code runs a confirmation box with Javascript on Asp.Net. I need to change the button texts. How can I use Yes or No buttons with this messagebox?