javascript - Change color of text in pop up message box -
i have message box pops display message if field left blank on form. want change color of writing red
protected void displaymsg(string msg) { string script = "<script>$(document).ready(function () { $(\"<div>" + msg.replace("'","").replace("\"","")+ "</div>\").dialog({modal: true,title: \"note\",buttons: [ { text: \"ok\", click: function() { $( ).dialog( \"close\" ); } } ]}); });</script>"; clientscript.registerclientscriptblock(this.gettype(), "message", script); }
how change color of text?
just add style div element, this
"<div style='color:red'>" + msg.replace("'","").replace("\"","")+ "</div>\"
Comments
Post a Comment