Show JavaScript Confirmation Message in Red Color

Last Reply one month ago By pandeyism

Posted one month ago

how to show confirmation message in red colour using javascript

You are viewing reply posted by: pandeyism one month ago.
Posted one month ago

Hey amar,

You can't do anything with the alert/confirm boxes. If you need to style them then you need to use jQuery Modal dialog.

Please refer below sample.


<script type="text/javascript" src=""></script>
<script src="" type="text/javascript"></script>
<link href=""
    rel="stylesheet" type="text/css" />
<script type="text/javascript">
    $(function () {
            buttons: {
                No: function () {
                Yes: function () {
    function Click() {
        alert("button is clicked.");
<div id="dialog" style="display: none; color: red" title="Confirmation Message">
    Did You want to close.
<input type="button" id="Button1" value="Button" style="display: none" onclick="Click();" />