[英]How to capture input's type = 'text' clear event?
<input type='text' onchange="reportAnswer(1, this.value);" onkeyup="this.onchange();" onpaste="this.onchange();" oncut="this.onchange();" onclear = "this.onchange();" />
如何捕捉这种变化? 这是IE11。
PS 我添加了onclear
处理程序,因为没有想法该怎么做。
你还没有说是什么提供了[x]
,这可能是相关的,但是你还没有尝试过的一个事件是input
这样的: Live Example
<input type='text'
onchange="reportAnswer(1, this.value);"
onkeyup="this.onchange();"
onpaste="this.onchange();"
oncut="this.onchange();"
oninput="this.onchange();" />
(不知道它是否有效,IE11 不会在 Windows 8.1 上为我添加该框。)
不过,更有可能的是,您需要挂钩提供[x]
任何东西所提供的东西。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.