<input type='text' onchange="reportAnswer(1, this.value);" onkeyup="this.onchange();" onpaste="this.onchange();" oncut="this.onchange();" onclear = "this.onchange();" />
How to capture that change? This is IE11.
P.S. I added onclear
handler because run out of ideas what to do.
You haven't said what's providing that [x]
, which is probably relevant, but the one event you haven't tried yet is input
so: Live Example
<input type='text'
onchange="reportAnswer(1, this.value);"
onkeyup="this.onchange();"
onpaste="this.onchange();"
oncut="this.onchange();"
oninput="this.onchange();" />
(No idea if it works, IE11 doesn't add that box for me on Windows 8.1.)
More likely, though, you need to hook into something provided by whatever it is that's providing that [x]
.
You can use the event of "oninput":
// Try to change value of the input below
<input id="input1" />
var input = document.getElementById("input1");
input.oninput = function(){alert("Value changed");}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With