我已经实现了一个 ui datepicker,它在 FF 中完美运行,但在 IE 中却不行。
请参阅此处链接尝试单击“Geboortedatum”字段。怎么了?
我已经实现了一个 ui datepicker,它在 FF 中完美运行,但在 IE 中却不行。
请参阅此处链接尝试单击“Geboortedatum”字段。怎么了?
Ladosa.js 中的第 76 - 78 行:
password:{
required: true,
},
应该
password:{
required: true
},
至少这就是我的 IE 给出的错误。
希望这可以帮助您朝着正确的方向前进。
编辑(第 78 行,也在 Ladosa.js 中)
rules: { //begin rules tag
...
password:{
required: true
}, // <--- remove this comma also!
}, //end rules tag
messages: {
name: "Please enter your name",
email: "Please enter a valid email address"
},
一定要检查所有开始标签是否都有结束标签,当删除函数中的代码时,请确保删除所有内容......
此外,如果你 INDENT(代码延迟 inspringen)你的代码更容易发现错误。
这是你的问题:
//set the rules for the field names
rules: {
firstname: {
required: true,
minlength: 2
},
surname: {
required: true,
minlength: 2
},
email:{
required: true,
email: true
},
password:{
required: true
}, <----- remove this comma !!!
},
删除上面的逗号。此外,如果您将该代码块放入http://jslint.com,您会发现同样的事情。正如其他人指出的那样,IE 不喜欢像散列那样的尾随逗号