DELAWARE'S · MIDDLETOWN · ODESSA · TOWNSEND AREA
This script uses the Document Object Model (DOM) to access data fields.
When an entry is made it will change the bacground color.
Background-color change function from head section.
First name: Last name: |
<head> <script type="text/javascript"> function setStyle(x) { document.getElementById(x).style.background="yellow" } </script> </head> |
Input fields are coded as follows:
<p> First name: <input type="text" onfocus="setStyle(this.id)" id="fname"></p> <p>Last name: <input type="text" onfocus="setStyle(this.id)" id="lname"> </p>
Return to Table of Contents
DELAWARE'S MIDDLETOWN ODESSA AND TOWNSEND AREA