propertychange方法

1.html文件

<td>
  <input id="clientPhone" type="text" name="clientPhone" style="150px;"   class="easyui-textbox" data-options="required:true" >
      <span id="hidd">已输入<span id="txtNum">0</span>位 </span>
  </input>
</td>

2.js方法

$('#clientPhone').next().children().on("input propertychange",function(){  
        var clientValue = $('#clientPhone').next().children().val();
             $('#txtNum').text(clientValue.length);
    
    });
原文地址:https://www.cnblogs.com/mr-wuxiansheng/p/6501733.html