首页 新闻 会员 周边 捐助

jQuery formValidator 中 ajaxvalidator 在服务器段获取两个控件的值,怎么写

0
[待解决问题]

 $("#<%=txtAccount.ClientID %>").formValidator({ validatorgroup: "lst", tipid: "txtAccountTip", onshow: "请输入分配金额", onfocus: "请输入分配金额", oncorrect: "" }).inputValidator({ min: 0, type: "number", onerror: "请输入分配金额" }).regexValidator({ regexp: "decmal1", datatype: "enum", onerror: "请输入分配金额" })
                             .ajaxValidator({
                                 type: "get",
                                 url: "ajax/CheckCompanyAdminBalance.aspx",
                                 data:"btyp=" + $("#<%=ddlAccount.ClientID %>").val(),
                                 datatype: "json",
                                 success: function(data) {
                                     //                     if (data == "1") {
                                     //                         return true;
                                     //                     }
                                     //                     else {
                                     //                         return false;
                                     //                     }
                                   
                                    $("#<%=lblAccountMsg.ClientID %>").text("");
                                    $("#<%=lblAccount.ClientID %>").text("");
                                     if (data[0].IsValid == "1") {                        
                                         $("#<%=lblAccount.ClientID %>").text(data[0].BAccount);
                                         return true;
                                     }
                                     else {                     
                                         $("#<%=lblAccountMsg.ClientID %>").text("最多可分配:" + data[0].Balance);
                                         return false;
                                     }

                                 },
                                 buttons: $("#button"),
                                 error: function() { alert("服务器没有返回数据,请重试"); },
                                 onerror: "超过您可分配金额",
                                 onwait: "正对金额进行合法性校验,请稍候..."
                             });
$("#<%=ddlAccount.ClientID %>").val() 下拉框的值 一直都是页面第一次加载的值

独孤上崖的主页 独孤上崖 | 初学一级 | 园豆:200
提问于:2011-02-12 14:30
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册