国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

126 lines
3.4KB

  1. <!--
  2. $(document).ready(function()
  3. {
  4. //用户类型
  5. if($('.usermtype2').attr("checked")==true) $('#uwname').text('公司名称:');
  6. $('.usermtype').click(function()
  7. {
  8. $('#uwname').text('用户笔名:');
  9. });
  10. $('.usermtype2').click(function()
  11. {
  12. $('#uwname').text('公司名称:');
  13. });
  14. //checkSubmit
  15. $('#regUser').submit(function ()
  16. {
  17. if(!$('#agree').get(0).checked) {
  18. alert("你必须同意注册协议!");
  19. return false;
  20. }
  21. if($('#txtUsername').val()==""){
  22. $('#txtUsername').focus();
  23. alert("用户名不能为空!");
  24. return false;
  25. }
  26. if($('#txtPassword').val()=="")
  27. {
  28. $('#txtPassword').focus();
  29. alert("登陆密码不能为空!");
  30. return false;
  31. }
  32. if($('#userpwdok').val()!=$('#txtPassword').val())
  33. {
  34. $('#userpwdok').focus();
  35. alert("两次密码不一致!");
  36. return false;
  37. }
  38. if($('#uname').val()=="")
  39. {
  40. $('#uname').focus();
  41. alert("用户昵称不能为空!");
  42. return false;
  43. }
  44. if($('#vdcode').val()=="")
  45. {
  46. $('#vdcode').focus();
  47. alert("验证码不能为空!");
  48. return false;
  49. }
  50. })
  51. //AJAX changChickValue
  52. $("#txtUsername").change( function() {
  53. $.ajax({type: reMethod,url: "index_do.php",
  54. data: "dopost=checkuser&fmdo=user&cktype=1&uid="+$("#txtUsername").val(),
  55. dataType: 'html',
  56. success: function(result){$("#_userid").html(result);}});
  57. });
  58. /*
  59. $("#uname").change( function() {
  60. $.ajax({type: reMethod,url: "index_do.php",
  61. data: "dopost=checkuser&fmdo=user&cktype=0&uid="+$("#uname").val(),
  62. dataType: 'html',
  63. success: function(result){$("#_uname").html(result);}});
  64. });
  65. */
  66. $("#email").change( function() {
  67. var sEmail = /\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/;
  68. if(!sEmail.exec($("#email").val()))
  69. {
  70. $('#_email').html("<font color='red'><b>×Email格式不正确</b></font>");
  71. $('#email').focus();
  72. }else{
  73. $.ajax({type: reMethod,url: "index_do.php",
  74. data: "dopost=checkmail&fmdo=user&email="+$("#email").val(),
  75. dataType: 'html',
  76. success: function(result){$("#_email").html(result);}});
  77. }
  78. });
  79. $('#txtPassword').change( function(){
  80. if($('#txtPassword').val().length < pwdmin)
  81. {
  82. $('#_userpwdok').html("<font color='red'><b>×密码不能小于"+pwdmin+"位</b></font>");
  83. }
  84. else if($('#userpwdok').val()!=$('txtPassword').val())
  85. {
  86. $('#_userpwdok').html("<font color='red'><b>×两次输入密码不一致</b></font>");
  87. }
  88. else if($('#userpwdok').val().length < pwdmin)
  89. {
  90. $('#_userpwdok').html("<font color='red'><b>×密码不能小于"+pwdmin+"位</b></font>");
  91. }
  92. else
  93. {
  94. $('#_userpwdok').html("<font color='#4E7504'><b>√填写正确</b></font>");
  95. }
  96. });
  97. $('#userpwdok').change( function(){
  98. if($('#txtPassword').val().length < pwdmin)
  99. {
  100. $('#_userpwdok').html("<font color='red'><b>×密码不能小于"+pwdmin+"位</b></font>");
  101. }
  102. else if($('#userpwdok').val()=='')
  103. {
  104. $('#_userpwdok').html("<b>请填写确认密码</b>");
  105. }
  106. else if($('#userpwdok').val()!=$('#txtPassword').val())
  107. {
  108. $('#_userpwdok').html("<font color='red'><b>×两次输入密码不一致</b></font>");
  109. }
  110. else
  111. {
  112. $('#_userpwdok').html("<font color='#4E7504'><b>√填写正确</b></font>");
  113. }
  114. });
  115. $("a[href*='#vdcode'],#vdimgck").bind("click", function(){
  116. $("#vdimgck").attr("src","../plus/vdimgck.php?tag="+Math.random());
  117. return false;
  118. });
  119. });
  120. -->