1. 程式人生 > >jQuery版本升級問題匯總

jQuery版本升級問題匯總

版本 bind interval 攻擊 cat .com 官方 jquer 1.0

背景:客戶需要,認為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已不再支持。

jQuery版本升級問題匯總