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">
Browser Support
Status
Attribute Values
Value | Description |
---|---|
script | Specifies the script to be run on onsearch |
Technical Details
Supported HTML elements:
<input type="search">