📌  相关文章
📜  jQuery 验证远程方法使用以检查用户名是否已存在 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:27.255000             🧑  作者: Mango

代码示例1
//HTML
$("#signupForm").validate({
  rules: {
    username: {
      required: true,
      minlength: 3,
      remote: "check-username.php"
    }
  },
  messages: {
    username:{
      remote: "This username is already taken! Try another."
    }
  }
});

//PHP code of check-username.php