我正在尝试寻找 IE7 中的问题,导致 jquery.validate.js 脚本中断。在 IE7 中,当我包含我的验证脚本时,我得到了两个相同的错误:
SCRIPT3: Member not found.
jquery.js, line 2699 character 4
SCRIPT3: Member not found.
jquery.js, line 2699 character 4
jquery.js (v1.7.1) 的第 2699 行是:
return ( ret.nodeValue = value + "" );
我的脚本是:
$("#gform_1").validate({
submitHandler: function(form) {
form.submit();
}
});
// First Name
$("#input_1_1").rules("add", {
required: true,
minlength: 2
});
// Last Name
$("#input_1_2").rules("add", {
required: true,
minlength: 2
});
// Birth Year
$("#input_1_62").rules("add", {
required: true
});
// Birth Month
$("#input_1_63").rules("add", {
required: true
});
// Birth Day
$("#input_1_64").rules("add", {
required: true
});
// Email
$("#input_1_4").rules("add", {
required: true,
email: true
});
// Alternate Email
$("#input_1_60").rules("add", {
email: true
});
// Home Phone Area Code
$("#input_1_67").rules("add", {
required: true,
digits: true,
minlength: 3,
maxlength: 3
});
// Home Phone Prefix
$("#input_1_68").rules("add", {
required: true,
digits: true,
minlength: 3,
maxlength: 3
});
// Home Phone Suffix
$("#input_1_69").rules("add", {
required: true,
digits: true,
minlength: 4,
maxlength: 4
});
// Cell Phone Area Code
$("#input_1_70").rules("add", {
required: true,
digits: true,
minlength: 3,
maxlength: 3
});
// Cell Phone Prefix
$("#input_1_71").rules("add", {
required: true,
digits: true,
minlength: 3,
maxlength: 3
});
// Cell Phone Suffix
$("#input_1_72").rules("add", {
required: true,
digits: true,
minlength: 4,
maxlength: 4
});
// Address
$("#input_1_10").rules("add", {
required: true,
minlength: 5
});
// City
$("#input_1_11").rules("add", {
required: true
});
// State
$("#input_1_73").rules("add", {
required: true
});
// Zip
$("#input_1_12").rules("add", {
required: true,
postal_code: true
});
// Months at residence
$("#input_1_75").rules("add", {
required: true
});
// Social Security Number Area Number
$("#input_1_77").rules("add", {
required: true,
digits: true,
minlength: 3,
maxlength: 3
});
// Social Security Number Group Number
$("#input_1_78").rules("add", {
required: true,
digits: true,
minlength: 2,
maxlength: 2
});
// Social Security Number Serial Number
$("#input_1_79").rules("add", {
required: true,
digits: true,
minlength: 4,
maxlength: 4
});
// Drivers License Number
$("#input_1_19").rules("add", {
required: true,
drivers_license_number: true
});
// Drivers License State
$("#input_1_76").rules("add", {
required: true
});
// Employer
$("#input_1_21").rules("add", {
required: true
});
// Months at current employer
$("#input_1_81").rules("add", {
required: true
});
// Work Phone Area Code
$("#input_1_84").rules("add", {
required: true,
digits: true,
minlength: 3,
maxlength: 3
});
// Work Phone Prefix
$("#input_1_85").rules("add", {
required: true,
digits: true,
minlength: 3,
maxlength: 3
});
// Work Phone Suffix
$("#input_1_86").rules("add", {
required: true,
digits: true,
minlength: 4,
maxlength: 4
});
// Work Phone Extension
$("#input_1_61").rules("add", {
digits: true
});
// Date of next paycheck
$("#input_1_52").rules("add", {
required: true,
date: true
});
// Date of second next paycheck
$("#input_1_53").rules("add", {
required: true,
date: true
});
// Total monthly income
$("#input_1_54").rules("add", {
required: true,
digits: true
});
// ABA Routing Number
$("#input_1_33").rules("add", {
required: true,
digits: true
});
// Account Number
$("#input_1_34").rules("add", {
required: true,
digits: true
});
// Bank Name
$("#input_1_35").rules("add", {
required: true
});
// Months at bank
$("#input_1_87").rules("add", {
required: true
});
删除此脚本可解决此问题。只需删除该$("#gform_1").validate()
功能,错误仍然存在。当我删除所有规则时,错误仍然存在。只有当我删除两者时,错误才会消失。
我相信这个错误正在破坏验证脚本。
是什么导致了这个问题?