onsearch event
Examples
When submitting Executive Search JavaScript:
<Input type = "search" onsearch = "myFunction ()">
try it"
Definition and Usage
onsearch event when the user presses the trigger "ENTER (ENTER)" key or click type = "search" of the <input> element "x (search)" button.
Browser Support
Figures in the table represent the first browser to support this version of events.
event | |||||
---|---|---|---|---|---|
onsearch | Yes | not support | not support | Yes | 15.0 |
grammar
In HTML:
<Elementonsearch = "myScript"> try
In JavaScript:
object .onsearch = function () {myScript }; try
JavaScript, use the addEventListener () method:
object .addEventListener ( "search", myScript ); try
Note: Internet Explorer 8 and earlier versions of IE do not support addEventListener () method.
technical details
Whether to support the bubble: | Yes |
---|---|
It can be canceled: | No |
Event Type: | Event |
Supported HTML tags: | <Input type = "search"> |