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.

body code in css

this gui

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

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -