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
- Uncaught TypeError: $(...).attr(...) is undefinedErrorUndefined
- TypeError: stringWidth is not a functionErrorFunction
- echarts:Uncaught TypeError: Cannot read property '0' of undefinedEchartsErrorUndefined
- TypeError: loaderContext.getOptions is not a functionErrorContextFunction
- react 和redux整合報TypeError: Object(...) is not a functionReactReduxErrorObjectFunction
- Ajax 報錯jquery-3.3.1.min.js:2 Uncaught TypeError: Cannot use 'in' operator to seajQueryJSError
- Uncaught TypeError: external_echarts_.helper.createTextStyle is not a functionat Object.seriesModel.layoutInstance.ondraw問題的解決ErrorEchartsFunctionObject
- javascript 中function(){},new function(),new Function(),Function 摘錄JavaScriptFunction
- TypeError: “ModelBase is not iterable”Error
- TypeError: SizeOnlySource is not a constructorErrorStruct
- Uncaught SyntaxError: Unexpected token <反思Error
- Uncaught Error: Cannot instantiate interfaceError
- TypeError: object() takes no parametersErrorObject
- vue-專案中less報錯 Module build failed: TypeError: loaderContext.getResolve is not a function問題解決以及安裝lessVueUIAIErrorContextFunction
- *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[APPException
- Fatal error: Uncaught PDOException: could not find driverErrorException
- 完美解決 Uncaught SyntaxError: Unexpected token ‘<‘Error
- Uncaught SyntaxError: Identifier 'Geometry' has already been declaredErrorIDE
- TypeError: can‘t concat str to bytesError
- TypeError: Failed to fetch dynamically imported moduleErrorAIImport
- TypeError: Object of type ‘datetime‘ is not JSON serializableErrorObjectJSON
- js報錯:TypeError: Date is not a constructorJSErrorStruct
- JavaScript FunctionJavaScriptFunction
- [Bash] functionFunction
- python FunctionPythonFunction
- Loss FunctionFunction
- java.util.function 中的 Function、Predicate、ConsumerJavaFunction
- pytorch 踩坑,TypeError: expected seqence object with len>_0 or a single integer_typeerror: expected sequence object with len __ 0PyTorchErrorObject
- toMyCar:119 Uncaught ReferenceError: toJS is not defined at HTMLAnchorElement.onclickErrorJSHTML
- Function型別Function型別
- DMSQL WITH FUNCTION子句SQLFunction
- JavaScript Function物件JavaScriptFunction物件
- A.Calculating FunctionFunction
- Function pointers and callbacksFunction
- addEventListener("touchend", function ()_devFunction
- ProTable 報錯Uncaught RangeError: Maximum call stack size exceededError
- WebThread:signal SIGABRT 和 libc++abi.dylib:terminating with uncaughtWebthreadC++