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

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -