<input type="text" name="title" id="title" placeholder="请输入标题" lay-verify="required" autocomplete="off" class="getKY" maxlength="1000" >
// 实时监听输入框的变化 $(".getKY").on('input propertychange',function(){ if($(this).val() !== ""){ getChange($(this).val());//输入框变化调用的方法 } });