4JqueryValidate的异步校验

1.简单方式

	name:{
	                required: true,
	                remote: {
	                    url: "${base}/admin/book/checkBookName.jhtml",
	                    cache: false
	                }
	          },

2.负责复杂方式

	remote: {
	        url: "check-email.php", //后台处理程序
	        type: "post", //数据发送方式
	        dataType: "json", //接受数据格式 
	        data: { //要传递的数据
	                username: function() {
	                        return $("#username").val();
	                }
	        }


猜你喜欢

转载自blog.csdn.net/booleaning/article/details/78516856