userReg.js
上传用户:u_thks
上传日期:2022-07-31
资源大小:1910k
文件大小:3k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

Java

  1. function CheckForm(){
  2. var iu, iuu, regArray=new Array("","◎","■","●","№","↑","→","↓"+
  3. "!","@","#","$","%","^","&","*","(",")","_","-","+","=","|","'","[","]","?","~","`"+
  4. "!","<",">","‰","→","←","↑","↓","¤","§","#","&","&","\","≡","≠"+
  5. "≈","∈","∪","∏","∑","∧","∨","⊥","∥","∥","∠","⊙","≌","≌","√","∝","∞","∮"+
  6. "∫","≯","≮",">","≥","≤","≠","±","+","÷","×","/","Ⅱ","Ⅰ","Ⅲ","Ⅳ","Ⅴ","Ⅵ","Ⅶ","Ⅷ","Ⅹ","Ⅻ","㈠","㈡"+
  7. "╄","╅","╇","┻","┻","┇","┭","┷","┦","┣","┝","┤","┷","┷","┹","╉","╇","【","】"+
  8. "㈢","㈣","㈤","㈥","㈦","㈧","㈨","㈩","①","②","③","④","⑤","⑥","⑦","⑧","⑨","⑩","┌","├","┬","┼","┍","┕","┗","┏","┅","─"+
  9. "〖","〗","←","〓","☆","§","□","‰","◇","︿","@","△","▲","#","℃","※",".","≈","¢"); 
  10. iuu=regArray.length;
  11. for(iu=1;iu<=iuu;iu++){
  12. if (document.Gforms.gvUserName.value.indexOf(regArray[iu])!=-1){
  13. alert("注册名不可以包含:" + regArray[iu]);
  14. document.Gforms.gvUserName.focus();
  15. return false;
  16. }
  17. }
  18. if (document.Gforms.gvUserName.value.length == 0) {
  19. alert("请输入您的名字.");
  20. document.Gforms.gvUserName.focus();
  21. return false;
  22. }
  23. if (document.Gforms.gvUserName.value.length < 2) {
  24. alert("用户名应大于2个小于15个字符");
  25. document.Gforms.gvUserName.focus();
  26. return false;
  27. }
  28. if (document.Gforms.gvUserName.value.length > 16) {
  29. alert("用户名应大于3个,小于15个字符.");
  30. document.Gforms.gvUserName.focus();
  31. return false;
  32. }
  33. if (document.Gforms.gvUserName.value.indexOf(" ")!=-1){
  34. alert("用户名中不能含有空格!!!");
  35. document.Gforms.gvUserName.focus();
  36. return false;
  37. }
  38. if (document.Gforms.gvUserPass.value.length == 0) {
  39. alert("请输入您的密码.");
  40. document.Gforms.gvUserPass.focus();
  41. return false;
  42. }
  43. if (document.Gforms.gvUserPass.value.length < 6) {
  44. alert("密码至少6位.");
  45. document.Gforms.gvUserPass.focus();
  46. return false;
  47. }
  48. if (document.Gforms.gvUserPass2.value.length == 0) {
  49. alert("请确认您的密码.");
  50. document.Gforms.gvUserPass2.focus();
  51. return false;
  52. }
  53. if (document.Gforms.gvUserPass.value != document.Gforms.gvUserPass2.value) {
  54. alert("您两次输入的密码不一样!请重新输入.");
  55. document.Gforms.gvUserPass.focus();
  56. return false;
  57. }
  58. if (document.Gforms.gvUserEmail.value.length == 0) {
  59. alert("请输入您的电子邮件.");
  60. document.Gforms.gvUserEmail.focus();
  61. return false;
  62. }
  63. if (document.Gforms.gvUserEmail.value.length > 0 && !document.Gforms.gvUserEmail.value.match(/^w+((-w+)|(.w+))*@[A-Za-z0-9]+((.|-)[A-Za-z0-9]+)*.[A-Za-z0-9]+$/) ) {
  64. alert("Email 错误!请重新输入");
  65. document.Gforms.gvUserEmail.focus();
  66. return false;
  67. }
  68. if (document.Gforms.gvUserPen.value.length > 200) {
  69. alert("您的签名太长了,换短点吧!.");
  70. document.Gforms.gvUserPen.focus();
  71. return false;
  72. }
  73. if (document.Gforms.gvUserIntro.value.length > 500) {
  74. alert("自我介绍不能超过500字符.");
  75. document.Gforms.gvUserIntro.focus();
  76. return false;
  77. }
  78. postMsg();
  79. return true;
  80. }