主页 > 工具导航 > 正文

onpropertychange(onpropertychange jquery)

工具导航 2022-05-23 19:33:01 0 xiang2024

onpropertychange(onpropertychange jquery)

  

firefox中的onpropertychange替代方案

  Oninput事件,在Firefox中不支持onpropertychange,但支持oninput。当文本中多了一个或少了一个字符时,将触发此事件。你好!很高兴回答你的问题!

  与Firefox和IE兼容的输入上的Onpropertychange事件:

  //状态改变时执行的函数

  函数句柄()

  {document.getelementbyid ('msg ')。innerhtml='输入文本的长度为:' document.getelementbyid ('txt ')。值.长度;

  //firefox下只能用oninput检测状态变化//注册事件需要addEventListener。

  if(/msie/I . test(navigator . user agent))//IE浏览器

  {document.getElementById('txt ')。onpropertychange=handle

  其他

  {//非ie浏览器,如Firefox

  document.getElementById('txt ')。addEventListener('input ',handle,false);

  您可以在Firefox社区中了解更多信息。希望我的回答对你有帮助。如有疑问,欢迎继续在本平台咨询。ById?select的id呢?1年猪不懂,jXqCTt。

onpropertychange事件没反应,该怎么解决

  你好,我来为你解答:

  不能直接添加on input=' txt change()' on property change=' txt change()'

  搜索:onpropertychange事件没有响应。怎么解决?

标签:

2019-2025 © https://www.blogone.net/ All Rights Reserved 粤ICP备15014801号 粤公网安备44170202000418号

sitemap | 联系我们

ONE技术网(www.blogone.net)为您提供生活中基础常识小技巧,帮助您解决生活烦恼!