1. 程式人生 > >TypeError: e.indexOf is not a function解決方法

TypeError: e.indexOf is not a function解決方法

This error might be caused by jquery event aliases like .load, .unload or .error deprecated since jQuery 1.8. Look for these aliases in your code and replace them with .on() to register listeners instead. Example:

$(window).load(function(){...});

becomes:

$(window).on('load', function(){ ...});

大概意思:$(window).load(function(){})在高版本中已經廢棄,

請用:$(window).on('load',function(){});替代

相關推薦

TypeError: e.indexOf is not a function解決方法

This error might be caused by jquery event aliases like .load, .unload or .error deprecated since jQuery 1.8. Look for these aliases in

TypeError:e.indexOf is not a function

更換jquery為最新版本jquery3.3.1報錯,報錯資訊如下: 報錯程式碼行: 高版本中 ( ′

關於TypeError: e[h] is not a function的問題

在工作中突然發現了這個錯誤: TypeError: e[h] is not a function 於是回過頭去重新檢查了一下程式碼,發現並沒有什麼問題,可還是一直報這個錯。 後來發現,原來是有個input標籤的type屬性為“submit”; 當有input標

UnCaught TypeError:date.getFullYear is not a function解決方案

        只想看解決方案的,可看紅字!         今天在公司做專案,要求在前臺顯示一個只顯示年月日的日期。         我在資料庫存的型別是date(此處要說一下date與datetime的區別:date年月日;datetime年月日時分秒),實體類的是ja

mongodb TypeError: db.collection is not a function 解決辦法

TypeError: db.collection is not a function 解決辦法 我也是自己踩坑(三個小時)剛剛出來的 在使用 MongoDB 資料庫 collect

TYPEERROR: UNDEFINED IS NOT A FUNCTION解決方法

今天除錯程式碼的時候碰到一個小問題,jQuery選擇器程式碼全部不起作用了,比如程式碼在爭取引用jQuery後呼叫$(‘.foo’)的時候還是報錯 TypeError: undefined is not a function解決方法異常簡單,原因是在把原先一個較大的js檔案

webpack4: compilation.mainTemplate.applyPluginsWaterfall is not a function 解決方法

webpack class gin 安裝 fall log 大坑 谷歌 維護 今天搗鼓webpack4踩到一個彌天大坑:使用html-webpack-plugin打包html的時候一直報 compilation.mainTemplate.applyPluginsWaterf

ajaxFileUpload報錯$.ajaxFileUpload is not a function解決方法

報錯資訊 Uncaught TypeError:$.ajaxFileUpload is not a function 大意就是,ajaxFileUpload這個函式未定義 錯誤背景 我使用了ajaxFileUpload這個js來實現不借助form表單的不

jquery.min.js?v=2.1.4:4 Uncaught TypeError: (b.contentType || "").indexOf is not a function

前臺運行 gpo 前臺 add cati json log ont fun 前臺運行PUT時出現錯誤:jquery.min.js?v=2.1.4:4 Uncaught TypeError: (b.contentType || "").indexOf is not a fun

2018-10-18T16:22:46.566+0800 E QUERY [js] TypeError: db.addUser is not a function :

新版的MongoDB已經不支援addUser方法了。  改成createUser了。  db.createUser({user:"zz",pwd:"zz",roles:[{role:"root"}]) 建立一個數據庫新使用者用db.createUser()方法,如果使用者

使用vue時Module build failed: TypeError: this._init is not a function錯誤的解決方法

錯誤描述 整個專案目錄結構如下: src hello.vue main.js index.html package.json webpack.config.js package.json { "name": "test-typeof-vue",

2018-10-18T16:22:46.566+0800 E QUERY [js] TypeError: db.addUser is not a function :

新版的MongoDB已經不支援addUser方法了。  改成createUser了。  db.createUser({user:"zz",pwd:"zz",roles:[{role:"root"}]) 建立一個數據庫新使用者用db.createUser()方法,如果使用者

js報錯 Uncaught TypeError: xxxx.each is not a function

each err typeerror span xxx list 報錯 pan 使用 在處理ajax返回的json數組時錯誤的使用了 list.each(function(){ }); 實際上當遍歷json數組是應該使用

Uncaught TypeError: o.block is not a function

erro TP 9.png .com In type ima alt typeerror 未捕獲TypeError:o。block不是一個函數 js少引,或者路徑錯誤Uncaught TypeError: o.block is not a function

Uncaught TypeError: window.showModalDialog is not a function 谷歌

sop fun replace 原創文章 aso csdn 版權 使用 parent //新版本谷歌沒有window.showModalDialog,創建一個window.openif(window.showModalDialog == undefined){ windo

TypeError: value.getTime is not a function (elementUI報錯轉載 )

"TypeError: value.getTime is not a function" 2018年07月02日 16:41:24 leeleejoker 閱讀數:2091 標籤: vueelementUI報錯d

random.html:20 Uncaught TypeError: (intermediate value)(...) is not a function

Uncaught TypeError: (intermediate value)(…) is not a function (function ($) { console.log($('div').html()) })(jQuery)

Uncaught TypeError: $(...)[1].prev is not a function問題

其實是:JQuery選擇器得到的元素物件,和JavaScript獲取元素物件 的問題 上面兩張圖是我對 input元素的獲取,使用的兩種方式,pic1用的是原生JS方式,pic2使用的jQuery。 從列印結果可以看出來,第一個返回了我一個節點,而第二返回給我了一個數組。

百度地圖api(微信小程式) TypeError: markers[j] is not a function

TypeError: markers[j] is not a function    at e.changeMarkerColor (http://127.0.0.1:63540/appservice/pages/index/index.js:72:17)    at e.<anonymous>

$(...).on is not a function 解決方案

比如在js加入 $("p").on("click",function(){     alert("The paragraph was clicked."); }); 如果報$(…).on is not a function 錯誤 可能是你的jQuery