cursor
判断字符是否包含特殊字符,中⽂
判断字符中是否包含有特殊字符:A
function containSpecial( s )
{
var containSpecial = RegExp(/[(\ )(\~)(\!)(\@)(\#)(\$)(\%)(\^)(\&)(\*)(\()(\))(\-)(\_)(\+)(\=)(\[)(\])(\{)(\})(\|)(\\)(\;)(\:)(\')(\")(\,)(\.)(\/)(\<)(\>)(\?)(\)]+/);
return ( st(s) );
考博英语}
trespassing判断字符中是否包含中⽂字符:B
function ischine(s){2021成绩查询入口
var regu = "^[0-9a-zA-Z]+$";
var re = new RegExp(regu);
perfect是什么意思
吊带裙搭配if (re.test( s )) {promptness
return fal;
}锻炼口才
vcereturn true;
wealth}
最近在项⽬开发中,有⽤到以上两个js,发现他们的先后顺序对程序也是有影响的,我先前的写法是B-A,这样不论输⼊的是特殊字符,还是中⽂,js都会弹出“请不要输⼊中⽂”对话框;后来我调换了两个js的顺序,改为A-B后,这样才正确!