我在html正文结束前<script href="parsley.remote.js"></script>
之前<script href="parsley.js"></script>
,我在Chrome开发者工具的控制台上看到以下消息:
Uncaught TypeError:无法读取undefined(匿名函数)的属性'on'@ parsley.remote.js:267(匿名函数)@ parsley.remote.js:271
paryley.remote.js代码的一部分:
window.Parsley.on('form:submit', function () {
this._remoteCache = {};
});
在Firebug上,错误控制台消息是
TypeError:window.Parsley未定义 window.Parsley.on('form:submit',function(){
A small lab just a test html page with source dist js parsley
如果我反转文件引用parsley.remote.js
和parsley.js
,则错误消失,但根据文档,这不是正确的方法。
答案 0 :(得分:0)
这是错误,修复于2.1.3 +。
仅包含remote
版本(假设您需要它)。