[英]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.