$("#input").on("input propertychange", function() { var this_val = $(this).val(); if((this_val.length == 4 || this_val.length == 9)) { $(this).val(this_val + '-'); } });
欢迎分享本文,转载请保留出处:前端ABC » input 可输入表单标签 内容变化实时监测
$("#input").on("input propertychange", function() { var this_val = $(this).val(); if((this_val.length == 4 || this_val.length == 9)) { $(this).val(this_val + '-'); } });
欢迎分享本文,转载请保留出处:前端ABC » input 可输入表单标签 内容变化实时监测