jQuery.Validate -- remote 多参数传递
2011-08-27 12:23
344 查看
http://www.rsywx.net/jquery/demos/index.html
表单:
remote:{
url:"{:U('Public/reCheckEmail')}",
data:{
uname:function(){
return $("#rename").val();
},
reemail:function(){
return $("#reemail").val();
}
}
}
php处理:
$username = t( $_REQUEST['uname'] );
$email = t( $_REQUEST['reemail'] );
/**
$file = fopen(SITE_PATH."/test.txt","w");
fwrite($file,$username."|".$email);
fclose($file);
*/
if (D("Members")->where("uname='".$username."' and email='".$email."'")->find()) {
echo "true";
}else{
echo "false";
}
格式:
remote:{
url:"",
data:{
par1:function(){ return $("#field").val(); },
par2:function(){}......
}
}
表单:
remote:{
url:"{:U('Public/reCheckEmail')}",
data:{
uname:function(){
return $("#rename").val();
},
reemail:function(){
return $("#reemail").val();
}
}
}
php处理:
$username = t( $_REQUEST['uname'] );
$email = t( $_REQUEST['reemail'] );
/**
$file = fopen(SITE_PATH."/test.txt","w");
fwrite($file,$username."|".$email);
fclose($file);
*/
if (D("Members")->where("uname='".$username."' and email='".$email."'")->find()) {
echo "true";
}else{
echo "false";
}
格式:
remote:{
url:"",
data:{
par1:function(){ return $("#field").val(); },
par2:function(){}......
}
}
相关文章推荐
- JQuery validate验证规则 转载 2014年04月19日 09:19:39 6050919 //定义中文消息 var cnmsg = { required: “必选字段”, remote:
- Jquery validate 的remote方法动态获取值
- jquery.validate通过remote来实现ajax验证范例
- 善用jQuery validate的remote
- jquery.validate.js remote (php)
- jquery easyui validatebox remote使用
- jQuery validate之remote
- 学习jquery validate插件方法remote
- jquery validate 的remote用法
- jquery-validate remote 远程校验返回非boolean类型处理
- 由jQuery Validation Remote验证引起的错误(MVC3 jQuery.validate.unobtrusive)
- jquery.validate.js插件的remote用法以及使用注意事项
- jquery-validate remote验证,返回不同的消息内容
- Jquery validate 用法以及remote
- 在JQuery的validate功能中使用remote实现Ajax功能后台验证
- jquery.validate remote 和 自定义验证方法
- jquery.validate通过remote来实现ajax验证范例
- jQuery Validate 中的 remote
- jQuery Validate 插件验证,,返回不同信息(json remote)自定义
- jquery.validate中使用remote,remote相同值不校验问题解决