//只允许汉字、英文字母、数字、下划线!
        else if (!txtName.match(/^[\u4E00-\u9FA5a-zA-Z0-9_]{0,}$/)) {//.match(/^[\u4E00-\u9FA5a-zA-Z0-9_]{3,20}$/) //{3,20}$表示是长度3-20
            $("#prompt_txtName").text("只允许汉字、英文字母、数字、下划线!");
        }
        //邮箱验证
        else if (!txtName.match(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/)) {
            $("#prompt_txtName").text("请输入正确的邮箱格式!");
        }

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-07
  • 2021-12-07
  • 2022-01-23
  • 2021-09-28
  • 2022-12-23
  • 2022-01-07
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-24
  • 2022-02-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案