var txt=new RegExp("[ ,\\`,\\~,\\!,\\@,\#,\\$,\\%,\\^,\\+,\\*,\\&,\\\\,\\/,\\?,\\|,\\:,\\.,\\<,\\>,\\{,\\},\\(,\\),\\',\\;,\\=,\"]");
//特殊字符正则表达式
if (txt.test(character))
{
alert("User Name can not contain SPACES or any of these special characters:\n , ` ~ ! @ # $ % ^ + & * \\ / ? | : . < > {} () [] \" ");
if (document.all)
{
window.event.returnValue = false;
}
else
{
arguments.callee.caller.arguments[0].preventDefault();
}
}
//特殊字符正则表达式
if (txt.test(character))
{
alert("User Name can not contain SPACES or any of these special characters:\n , ` ~ ! @ # $ % ^ + & * \\ / ? | : . < > {} () [] \" ");
if (document.all)
{
window.event.returnValue = false;
}
else
{
arguments.callee.caller.arguments[0].preventDefault();
}
}