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

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -