jquery verification, can only be entered in English or Chinese

Source: Internet
Author: User

/**

The user name can only be in English or Chinese

*/


$ ("#spreadName"). Formvalidator ({empty:false,
OnShow: "Please enter the name of the account holder",
onfocus: "Please enter the name of the account holder",
Oncorrect: "Input correct"
}). inputvalidator ({
Min:2,
Max:16,
Onerrormin: "Account holder name format input error. ",
Onerrormax: "Account holder name format input error. "
}). functionvalidator ({
Fun:function (Val, spreadname) {
/^[^a-za-z0-9_\u4e00-\u9fa5]/Chinese =/^[0-9a-za-z_\u4e00-\u9fa5]*$//^ ([\u4e00-\u9fa5]|[ \UFE30-\UFFA0]) *$//^[^\u4e00-\u9fa5]*$/
var regname =/^[\ ' \^\#\$%\&\|\:\[\]\{\}\=\ ' \>\<?]| [0-9].*$/;
if (Regname.test (val)) {
Return "The item can only be made up of letters or Chinese";
}
return true;
}

});




The picture effects on the bank are made with table.

function Check (sId) {
var oimg = document.getelementsbytagname (' img ');
var radios = $ (' #frm Input[type=radio] ');

for (var i = 0; i < oimg.length; i++) {
OBJ = document.getElementById ("Banktype" + (i + 1));
if (oimg[i].id = = sId) {
Obj.checked = true;
Oimg[i].style.border = ' 1px solid red ';
} else {
Oimg[i].style.border = ' 0px solid red ';
}
}

for (var i = 0; i < radios.length; i++) {
OBJ = document.getElementById ("img" + (i + 1));
if (radios[i].id = = sId) {
Obj.style.border = ' 1px solid red ';
} else {
Radios[i].style.border = ' 0px solid red ';

}
}
}



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.