Changing javascript snippet background and text colors -


Can I change the color of this snippet from the 100 widgets? I would like to read the image color to be 2 a 5500 (green) and white.

I did not understand what you're actually saying, but anyway you elem .style.background and elem.style.color .

Example:

HTML:

  & lt; Div id = "elem" style = "width: 400px; height: 250px; range: 1px solid" & gt; Welcome & lt; / Div & gt;   

Javascript:

  var elem = document.getElementById ('elem'); Elem.onmouseover = function () {elem.style.background = "# 2a5500"; Elem.style.color = "# ff0080"; } Elem.onmouseout = function () {elem.style.background = ""; Elem.style.color = ""; }    

Comments