SiteExperts.com Logo Home | Community | Developer's Paradise | Jobs
User Groups | Site Tools | Site Information | Search

Inside Technique : Highlight Button
By Scott Isaacs

Style sheets and the full event model are exposed on the built-in controls. Try the button below:

Description

A different style rule is displayed when the mouse goes over, down, and up over the button. For this button, the following classes are defined:

 .over {color:yellow; background: navy}
 .down {color:yellow; background: navy; font-style: italic}

Highlight Button

    <INPUT 
      TYPE="Button"
      ONMOUSEOVER="this.className='over';" 
      ONMOUSEOUT="this.className='';" 
      ONMOUSEDOWN="this.className='down';" 
      ONMOUSEUP="this.className='over';" 
      VALUE="Click Me" 
      ONCLICK="this.value='Ouch - You Clicked Me!'">
Discuss and Rate this Article