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 - IIFE: var vs this - is there any difference? -

ios - Google API (YouTube search): Bad network response -