Form Changes Color

[Total: 0    Average: 0/5]

This shows how to use style sheet properties to change the cosmetics of a text button.

Body Code:

<STYLE>
  .bigChange {color:blue; font-weight:bolder; font-size:175%;
letter-spacing:4px;  text-transform: uppercase; background:yellow}
  .start {color:yellow; background:navy}
</STYLE>

<SCRIPT LANGUAGE=JAVASCRIPT>
  function highlightButton(s) {
    if ("INPUT"==event.srcElement.tagName)
      event.srcElement.className=s
  }
</SCRIPT>
<FORM NAME=highlight onmouseover="highlightButton('start')"
onmouseout="highlightButton('')">
    <input type="button" Value="Pass your mouse over me">
</FORM>

Times Viewed: 0

Leave a Reply

Your email address will not be published. Required fields are marked *