A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/dom/FocusEvent/blur below:

blur ยท WebPlatform Docs

blur Overview Table Synchronous No Bubbles No Target dom/Element Cancelable No Default action ?

## Examples

This example shows how to display the name of the object that has lost focus, that is, the object that fires the onblur event.

<html>
<body>
<input type="text"
    name="txtFName"
    value="First Name"
    onblur="console.log(event.srcElement.name)">
<input type="text"
    name="txtLName"
    value="Last Name"
    onblur="console.log(event.srcElement.name)">
<input type="text"
    name="txtPhone"
    value="Phone"
    onblur="console.log(event.srcElement.name)">
</body>
</html>

View live example

Notes Remarks

The onblur event fires on the original object before the onfocus or onclick event fires on the object that is receiving focus. Where applicable, the onblur event fires after the onchange event. Use the focus events to determine when to prepare an object to receive or validate input from the user. As of Microsoft Internet Explorer 5, you must set the tabIndex attribute of elements that expose the onblur event. For Internet Explorer 5 and later, the onblur event is asynchronous. Switches focus away from the object on which the event is fired. To invoke this event, do one of the following:

The pEvtObj parameter is required for the following interfaces:

Syntax Standards information Event handler parameters
pEvtObj [in]
Type: ****IHTMLEventObj****
Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4