<script type="text/javascript">
checkCustomize = function() {
var a=jQuery("#field11604").val();//获取字段值,改成对应的字段可以了。
var b=a.toString().replace(".","").substr(0,2);//截取值的前两位(0表示从第一位开始,2表示截取两位)
var c=a.length;
if(c>=2){
//如果输入值大于等于两位,则可以继续进行
a=jQuery("#field11604").val(b);
return true;
}else{
//如果小于两位则无法保存
alert("对不起,长度不够无法截取");
return false;
}
}
</script>
Please leave a message in the comment area and discuss together~~~
If necessary, please contact WeChat: hdygzh2019 At the same time, please explain your intention and make progress together! ! !