Event fired when clearing text input on IE10 with clear icon
问题 On chrome, the "search" event is fired on search inputs when user clicks the clear button. Is there a way to capture the same event in javascript on Internet Explorer 10? 回答1: The only solution I finally found: // There are 2 events fired on input element when clicking on the clear button: // mousedown and mouseup. $("input").bind("mouseup", function(e){ var $input = $(this), oldValue = $input.val(); if (oldValue == "") return; // When this event is fired after clicking on the clear button //