转自:https://www.cnblogs.com/linJie1930906722/p/5209135.html

完整代码:

jQuery监听文本框值改变触发事件(propertychange)
    


            
jQuery监听文本框值改变触发事件(propertychange)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script src="jquery-1.9.1.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function() {
            $(function () {
                $('#inputId').on/*bind*/("input propertychange", function () {
                    alert("文本框的值:"+$(this).val());
                    //这里写你的处理代码
                });
            });

        });
    </script>
</head>
<body>
<input />
</body>
</html>
jQuery监听文本框值改变触发事件(propertychange)
    


            
jQuery监听文本框值改变触发事件(propertychange)

 

完整代码:

jQuery监听文本框值改变触发事件(propertychange)
    


            
jQuery监听文本框值改变触发事件(propertychange)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script src="jquery-1.9.1.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function() {
            $(function () {
                $('#inputId').on/*bind*/("input propertychange", function () {
                    alert("文本框的值:"+$(this).val());
                    //这里写你的处理代码
                });
            });

        });
    </script>
</head>
<body>
<input />
</body>
</html>
jQuery监听文本框值改变触发事件(propertychange)
    


            
jQuery监听文本框值改变触发事件(propertychange)

 

相关文章:

  • 2022-01-07
  • 2022-01-15
  • 2022-12-23
  • 2021-07-14
  • 2022-12-23
  • 2022-12-23
  • 2021-12-30
  • 2022-12-23
猜你喜欢
  • 2021-06-11
  • 2022-12-23
  • 2022-02-15
  • 2022-12-23
  • 2022-01-16
  • 2022-12-23
  • 2021-11-09
相关资源
相似解决方案