When you enter the input field, a function is triggered which sets the background color to yellow. When you leave the input field, a function is triggered which sets the background color to red.
<input type="text" onfocus="focusFunction()" onblur="blurFunction()">
Type: | html |
Category: | Web Tutorial |
Sub Category: | HTML Form Events Attribute |
Uploaded by: | Admin |