jquery-3.4.1.js:10091 Uncaught TypeError: url.indexOf is not a function
這是因為layui和jQuery衝突引起的
解決方案:
在你的 layui.js中找到下面程式碼
e="string"==typeof e?[e]:e,window.jQuery&&jQuery.fn.on&&(y.each(e,function(t,n){"jquery"===n&&e.splice(t,1)}),layui.jquery=layui.$=jQuery);
將上面這段程式碼改為下面的程式碼
e="string"==typeof e?[e]:e,window.jQuery;
如果你使用的不是壓縮後的js,把這段程式碼註釋即可
相關文章
- Uncaught TypeError: i is not a functionErrorFunction
- js 函式報錯“Uncaught: TypeError xxx is not a function”JS函式ErrorFunction
- Uncaught TypeError: $(...).attr(...) is undefinedErrorUndefined
- Uncaught TypeError: Object # has no method 'load'ErrorObject
- echarts:Uncaught TypeError: Cannot read property '0' of undefinedEchartsErrorUndefined
- Uncaught TypeError: Object [object Object] has no method 'xxx'ErrorObject
- react 和redux整合報TypeError: Object(...) is not a functionReactReduxErrorObjectFunction
- Ajax 報錯jquery-3.3.1.min.js:2 Uncaught TypeError: Cannot use 'in' operator to seajQueryJSError
- PHP Fatal error: Uncaught Error: Call to undefined function pcntl_fork().. 開啟php pcntl擴充套件實現多程式PHPErrorUndefinedFunction套件
- TypeError: object() takes no parametersErrorObject
- TypeError: “ModelBase is not iterable”Error
- TypeError: SizeOnlySource is not a constructorErrorStruct
- javascript 中function(){},new function(),new Function(),Function 摘錄JavaScriptFunction
- Uncaught Error: Cannot instantiate interfaceError
- Uncaught SyntaxError: Unexpected token <反思Error
- jQuery報錯:Uncaught ReferenceError: $ is not definedjQueryError
- TypeError:a.replaceisnotafunction錯誤ErrorFunction
- Fatal error: Uncaught PDOException: could not find driverErrorException
- 完美解決 Uncaught SyntaxError: Unexpected token ‘<‘Error
- vue-專案中less報錯 Module build failed: TypeError: loaderContext.getResolve is not a function問題解決以及安裝lessVueUIAIErrorContextFunction
- js報錯:TypeError: Date is not a constructorJSErrorStruct
- $(function(){})與(function($){....})(jQuery)的區別FunctionjQuery
- TypeError: Object of type ‘datetime‘ is not JSON serializableErrorObjectJSON
- TypeError: can‘t concat str to bytesError
- JavaScript FunctionJavaScriptFunction
- javascript Function()JavaScriptFunction
- sendDataByUdp FunctionUDPFunction
- Substr FunctionFunction
- Function : dumpFunction
- Uncaught SyntaxError: Identifier 'Geometry' has already been declaredErrorIDE
- ProTable 報錯Uncaught RangeError: Maximum call stack size exceededError
- jqGrid 兩種列模型(TypeError: b is undefined)模型ErrorUndefined
- Javascript 物件導向學習1 Function function ObjectJavaScript物件FunctionObject
- js中Uncaught RangeError: Maximum call stack size exceeded錯誤JSError
- DMSQL WITH FUNCTION子句SQLFunction
- JavaScript Function物件JavaScriptFunction物件
- python FunctionPythonFunction
- Function型別Function型別