Jump to content

RanchWest

Members
  • Posts

    4
  • Joined

  • Last visited

RanchWest's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. I figured out an approach that is okay: <html><body> <table> <script> function changeBG() { var selectedBGColor = document.getElementById("bgchoice").value; document.getElementById("myChoice").style.backgroundColor = selectedBGColor; } </script> <br> 1 <select id="bgchoice" size=2 onchange="changeBG()" > <option value="white">In</option> <option value="lightgray">Scratch</option> </select> <tr id="myChoice" style=background-color:lightgray;><td>Column 1</td><td>Column 2</td></tr> </table> </body> </html>
  2. Here is my basic page: <html> <body> <table> <tr id="MyRow" style=background-color:lightgray;><td>Column 1</td><td>Column 2</td></tr> </table> </body> </html> I want the user to be able to change MyRow to toggle to background-color:white or toggle back to background-color:lightgray through a mouse action... through a form or whatever. Not a mouseover, though.
  3. Niche, That's basically what I want, but I want to provide input that would change the bgcolor of the <TR> element. That's the part that I don't know how to do.
  4. I would like to interactively change the color of an HTML element -- for instance, a table row. I know how to initially set the color and I am somewhat familiar with CSS. I know a little about forms. I would like to have a checkbox form that on submit would change, say, a table row color. What would be a simple way to do that?
×
×
  • Create New...