您的位置:首页 > Web前端 > JQuery

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(){}......

}

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: