asp.net - Getting colour from database to DIV background -


i retrieving color code table stored in database.

how able set background color of div based on color code?

you can javascript.

document.getelementsbyclassname('divname')[0].style.backgroundcolor = "your color; 

or jquery

$('#element').css('background-color',''); 

you need pull values db onto page , find value , assign it


Comments

Popular posts from this blog

matlab - Deleting rows with specific rules -

jquery - How would i go about shortening this code? And to cancel the previous click on click of new section? -