function bindpagerclick(config) { var eventfunction = function () { if ($(this).attr("disabled") != undefined) { return false; } var url = $(this).attr("data-ajax-url") || undefined; url = url == undefined ? $(this).attr("href") : url; var formname = config == undefined || config == null || config.formid == null || config.formid == undefined || config.formid == "" ? "form[data-ajax]" : config.formid; if (config && !config.issubmit) { config.notsubmitcall(url); return false; } if (config != undefined && config != null && config.vaildate != null && config.vaildate != undefined) { if (!config.vaildate(formname)) { return false; } } var form = $(formname); form.attr("action", url); form.submit(); return false; }; $("a[data-pageindex]").on("click", this, eventfunction); }; // 将搜索页面的索引页设置为1 function resetpage(fromid) { var oldurl = $("#" + fromid).attr("action"); var newurl = replaceparamval(oldurl, "page", "1"); $("#" + fromid).attr("action", newurl); }; function replaceparamval(oldurl, paramname, replacewith) { var re = eval('/(' + paramname + '=)([^&]*)/gi'); var nurl = oldurl.replace(re, paramname + '=' + replacewith); return nurl; }; function formbegin(showload) { if ($("#loading").length == 0) { $("#" + showload).prepend("