8
当用户在搜索输入字段(在webkit浏览器中)中单击X以取消搜索或清除文本时,会触发什么事件?html5搜索输入事件
提供有关restyling the button和other custom events的信息,但不能使用此按钮。
当用户在搜索输入字段(在webkit浏览器中)中单击X以取消搜索或清除文本时,会触发什么事件?html5搜索输入事件
提供有关restyling the button和other custom events的信息,但不能使用此按钮。
当提交搜索输入时以及用户清除搜索时,都会触发onsearch事件。
<input type=search onsearch="javascript:alert('SEARCH: ' + this.value);" />
当用户清除搜索时,该事件在IE中似乎没有触发。 – Navarr 2012-07-11 17:47:48