首页 新闻 会员 周边

formValidator 动态传值问题

0
[已关闭问题] 关闭于 2017-05-19 16:54

$("#txb2Mobile").formValidator({ onshow: "", onfocus: "请输入手机号码", oncorrect: "" }).inputValidator({ min: 1, max: 11, onerror: "您输入的手机号码长度不合理" }).regexValidator({ regexp: "mobile", datatype: "enum", onerror: "您输入的手机号码格式不正确" })
.ajaxValidator({
type: "post",
url: "Ajax/GetBackPassWord.ashx",
async: false,
datatype: "text",
//data: "action=7&txbCode="+function (){ return $("#txbCode").val()},
//data: "action=7&t=" + ((new Date()).getTime()),
data: {'action':'7', 'txbCode':function (){ return $("#txbCode").val(); }},
success: function (data) {
if (data == "0") return false;
else return true;
},
oncorrect: "手机号码输入正确!",
onerror: "手机号码不存在!",
onwait: "正在检测验证码,请稍候..."
});

 

为什么这样 action为空   如果这样传值:data: "action=7&txbCode="+function (){ return $("#txbCode").val()}, txbCode,无法获取值, 有什么好的方法能解决该问题呢?

sofootball的主页 sofootball | 初学一级 | 园豆:44
提问于:2016-11-09 09:47
< >
分享
所有回答(1)
0

先学学怎么插入代码吧。

顾晓北 | 园豆:10844 (专家六级) | 2016-11-24 16:03
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册