colors - How to change colour in CSS, by giving condition? -
i'm having body. in there 1 field "status". if status=ok background should white color. if status=error, background should red. please tell me how give condition in css file.
you can use jquery method so. try following:
var status = $("[id$=lblstatus]").val() if(status == "ok") { $jquery("body").css("background-color","white"); } else if (status == "error") { $jquery("body").css("background-color","gray"); }
Comments
Post a Comment