演示了如何向 input 元素添加 "onsearch" 事件

在搜索文本域中输入信息并按下 "ENTER" 键

注意:Internet Explorer, Firefox 或 Opera 12 及其更早版本不支持 onsearch 事件