How to capture input event of type = 'text' clear event?

<input type='text' onchange="reportAnswer(1, this.value);" onkeyup="this.onchange();" onpaste="this.onchange();" oncut="this.onchange();" onclear = "this.onchange();" />

enter image description here

How to commit this change? This is IE11.

PS I added a handler onclear

because I ran out of ideas on what to do.

+3


source to share


1 answer


You didn't say it means [x]

, which is probably relevant, but one event you haven't tried yet is like input

this: Live example

<input type='text'
    onchange="reportAnswer(1, this.value);"
    onkeyup="this.onchange();"
    onpaste="this.onchange();"
    oncut="this.onchange();"
    oninput="this.onchange();" />

      



(Don't know if it works, IE11 doesn't add this window for me on Windows 8.1.)

Chances are you need to latch onto something provided by what it means that [x]

.

+1


source







All Articles