var s = /[ ~`@#\$%\^&\*\(\)\{\}\[\]\|'<>/?\\]/;
var str=document.form1.name.value;
var re = str.match(s);
if(re != null)
{
alert ("用户名称或组名包含非法字符!");
document.form1.name.value;
return;
}
var strname = document.form1.name.value;
if (strname.length > 20)
{
alert ("用户名称不能超过10个中文!");
document.form1.name.focus();
return;
}
if (document.form1.callnum.value == "")
{
alert ("请填写联系电话!");
document.form1.callnum.focus();
return;
}
var strcallnum = document.form1.callnum.value;
var str = strcallnum.substr(strcallnum.length-1,1)
if (str==",")
{
strcallnum = strcallnum.substr(0,strcallnum.length-1);
}
else if (str!=",")
{strcallnum = document.form1.callnum.value;
}
if (strcallnum.length > 11)
{
alert ("联系电话不能超过11位!");
document.form1.callnum.focus();
return;
}