HTML onsearch event Attribute
Example
<input type="search" id="myInput" onsearch="myFunction()">
Meaning
The onsearch attribute fires when the user writes something in a search input field.
Standard Syntax
<element onsearch="script">
Advertisement
Attribute Values
| Value | Description |
|---|---|
| script | Specifies the script to be run on onsearch |
Technical Details
Supported HTML elements:
<input type="search">