I'm trying to get the value of cookies enabled to turn red if false or green if true but I've only been able to change the color regardless if it's true or false, is there another way around this using JS?
Or if you were to take it one step further, is it possible to put in an image (red X or green Tick) after the value?
HTML
<table class="table"> <tr> <td>Cookies Enabled:</td> <td id="cookie"></td> </tr> </table> JS
var Cookies; { if (navigator.cookieEnabled) { Cookies = "True"; } else { Cookies = "False"; } } window.onload = function () { document.getElementById("cookie").innerHTML = Cookies; }