Example of onFocus Event Object, JavaScript Tutorial, Global Guide Line Technology.
Bookmark Bookmark: Example of onFocus Event Object, JavaScript Tutorial Forum | Blog |

JavaScript Tutorial Home Page JavaScript Examples >> onFocus Event Object Example




Example of onFocus Event Object

An Event Handler executes a segment of a code based on certain events occurring within the application, such as onFocus Event Handler. An onFocus Event Handler executes JavaScript code when input focus enters the field either by tabbing in or by clicking but not selecting input from the field. For windows, frames and framesets the Event Handler executes JavaScript code when the window gets focused. In windows you need to specify the Event Handler in the <BODY> attribute. For example:

<BODY BGCOLOR="#ffffff" onFocus="document.bgcolor='#000000'">

[ About ] [ Contact ] [ Home ]
[ Links ] [ Site Map ] [ Services ] [ Privacy ]

Copyright 2005 -  2019 www.globalguideline.com All rights reserved. (Best viewed in IE 6.0+ or Firefox 2.0+ at 1024 * 768 or higher) 191 visitors are online now