hlzyWeb/Admin/demo/form/js/jquery.formvalidation.js
(开头部分) 7KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
(function ($) {
$.fn.extend({
'formvalidation': function (obj) {
var that = this;
var $submit = null;
if (obj["submit"] == null) {
$submit = $(this).find("input[type=submit]");
obj["submit"] = "";
}
else {
$submit = $(obj["submit"]);
}
//获取默认值
$(this).find(':input').each(function () {
var inputname = $(this).attr("name");
if (obj[inputname] != null) {
var nextmsg = $(this).next().text().trim();
if (nextmsg != "") {
$(this).attr("content", nextmsg);
}
};;
});
$(this).find(':input').on('blur', function () {
$(this).keyupValFn(obj);
});
$(this).find(':checkbox').on('change', function () {
$(this).changValFn(obj)
})
$(this).find(':radio').on('change', function () {
$(this).changValFn(obj)
});
if ($submit.length > 0) {
$submit.click(function () {
if (!$(that).IsValid()) {
return false;
}
});
}
},
'IsValid': function () {
$(this).find(":input").trigger("blur");
$(this).find(':radio').trigger('change');
$(this).find(':checkbox').trigger('change');
var numError = $(this).find('.has-error').length;
if (numError) {
return false;
}
return true;
},
后面还有 144 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
