jQuery版本升级问题汇总

背景:客户需要,认为3.0之前的版本存在XSS(跨站脚本攻击)风险,jquery版本需要从当前的1.8.2更新到3.3.1。

查询了官方文档,https://www.jquery123.com/category/deprecated/deprecated-3.0/

1、3.0以后的版本主要弃用的API有:.bind()、.unbind()、.delegate()、.undelegate()、jquery.fx.interval

1.9和1.10版本弃用的API有jquery.support()、.context()

2、另外,还有attr和prop问题,attr是1.0之后使用的,prop是1.6以后使用的,更新到3.31之后,attr已不再支持。

猜你喜欢

转载自www.cnblogs.com/xuqiushuo/p/10638600.html