<input id="pip_${channel.id}_1" type="text" class="form-control inp_type1 w100" name="name" maxlength="12" oninput="if(!/^[0-9]+$/.test(value)) value = value.replace(/[^\d]/g,'');if(value>100)value=100;if(value<0)value=null">
核心代码:
οninput="if(!/^[0-9]+$/.test(value)) value = value.replace(/[^\d]/g,'');if(value>100)value=100;if(value<0)value=null"