範例
將以下程式拷貝回您的網頁
<head>
<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>
</head>
<body>
<FORM NAME=highlight onmouseover="highlightButton('start')" onmouseout="highlightButton('')">
<input type="button" value="按鍵一">
<input type="button" onmousedown="this.style.fontStyle='italic'" onmouseup="this.style.fontStyle=''" value="按這��" onclick="this.value='按對了'">
<input type="button" value="按鍵三">
</FORM>