jquery报错 .size is not a function 解决办法

2022年5月27日09:45:39 发表评论
微信搜一搜 ts小陈

报错:

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

注意点不要忘了加

 

小陈号卡
ts小陈

发表评论(不允许含有网址!)

:?: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :cry: :mrgreen: :neutral: :razz:

已登录用户不需要填写以下内容