var orderCode=$("#orderCode").val();
var scheduledProducedUnits=$("#scheduledProducedUnits").val();
var str=/^[^@\/\'\\\"#$%&\^\*]+$/;
if(isNaN(scheduledProducedUnits)){
new PNotify({
text: '计划生产数量必须是数字',
type: 'error',
styling: 'bootstrap3'
});
return false;
}else if(orderCode==""){
new PNotify({
text: '订单编号不能为空',
type: 'error',
styling: 'bootstrap3'
});
return false;
}else if(/[@\/'\\"#$%&--\^*]/.test(orderCode)){
new PNotify({
text: '订单编号包含敏感字符',
type: 'error',
styling: 'bootstrap3'
});
return false;
JS 判断特殊字符
最新推荐文章于 2023-11-21 17:11:49 发布