报错:
jquery.min.js:2 jQuery.Deferred exception: e.size is not a function TypeError: e.size is not a function
原因:
jquery版本问题,1.8后废弃了size() 用length代替。引用的 jquery 版本在是废除了 .size()之后的版本。
或者可以引用老版本的 jquery。
解决办法:
把js文件中的 .size() 替换成 .length
注意点不要忘了加
修复jQuery.size()报错
本文解决了因jQuery版本升级导致的.size()方法废弃问题。介绍了如何将.size()替换为.length来解决错误,并提供了使用旧版jQuery作为备选方案。
报错:
jquery.min.js:2 jQuery.Deferred exception: e.size is not a function TypeError: e.size is not a function
原因:
jquery版本问题,1.8后废弃了size() 用length代替。引用的 jquery 版本在是废除了 .size()之后的版本。
或者可以引用老版本的 jquery。
解决办法:
把js文件中的 .size() 替换成 .length
注意点不要忘了加
497
1万+
5457

被折叠的 条评论
为什么被折叠?