Show JavaScript Confirmation Message in Red Color

Last Reply 5 months ago By pandeyism

Posted 5 months ago

how to show confirmation message in red colour using javascript

You are viewing reply posted by: pandeyism 5 months ago.
Posted 5 months 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();" />