The following examples use the text-transform attribute and the textTransform property to transform a block of text from lower case to upper case when the user moves the mouse over the text. The text transforms back to lower case when the user clicks the text.
This example uses three calls to an embedded (global) style sheet to transform the text.
.transform1 { text-transform:uppercase }
.transform2 { text-transform:lowercase }
.transform3 { text-transform:none }
οnmοuseοver="this.className='transform1'"
οnclick= "this.className='transform2'"
οndblclick="this.className='transform3'">
:
This feature requires Microsoft® Internet Explorer 4.0 or later. Click the following icon to install the latest version. Then reload this page to view the sample.
This example uses inline scripting to transform the text when different mouse events occur.
οnmοuseοver="this.style.textTransform='uppercase'"
οnmοuseοut="this.style.textTransform='lowercase'"
οnclick="this.style.textTransform='none'">
:
This feature requires Microsoft® Internet Explorer 4.0 or later. Click the following icon to install the latest version. Then reload this page to view the sample.