jQuery報錯:Uncaught ReferenceError: $ is not defined
今天在搗鼓spring mvc的時候,遇到了這麼一個錯誤:
jQuery報錯:Uncaught ReferenceError: $ is not defined
在idea中按住ctrl可以導航到js檔案,但跑起來之後 一直載入不了jquery。程式碼如下:
既然在idea中按住Ctrl鍵可以導航到jquery檔案中說明路徑沒有錯誤,百思不得其解啊,於是在群裡問了一下,有個網名是【濤濤】的大哥,遠端幫我看了一下,發現是網頁對於js檔案的請求被spring mvc給攔截,通過配置解除攔截,問題消失。
解除攔截的方法如下:
Spring MVC靜態資源攔截
作者:jiankunking 出處:http://blog.csdn.net/jiankunking
相關文章
- toMyCar:119 Uncaught ReferenceError: toJS is not defined at HTMLAnchorElement.onclickErrorJSHTML
- 報錯ReferenceError: require is not defined,找不到requireErrorUI
- 報錯:Uncaught ReferenceError: SockJS is not defined at gomoku.js:1:16 crack.js:1 enable_copy_cracked:falseErrorJSGoFalse
- ReferenceError: webpack is not definedErrorWeb
- 【爬坑日記】vue中引入echarts,報錯ReferenceError: echarts is not definedVueEchartsError
- Uncaught Error: Bootstrap‘s JavaScript requires jQuery報錯問題解決ErrorbootJavaScriptUIjQuery
- Ajax 報錯jquery-3.3.1.min.js:2 Uncaught TypeError: Cannot use 'in' operator to seajQueryJSError
- ProTable 報錯Uncaught RangeError: Maximum call stack size exceededError
- vue使用vue-amap元件報錯AMap is not definedVue元件
- jmeter報錯“Uncaught exception in thread Thread[AWT-EventQueue-0,6,main]“JMeterExceptionthreadAI
- 報錯:org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'xxx'is definedSpringFrameworkBeanException
- Laravel 路由學習 - 遇到問題,報錯:Route [home] not definedLaravel路由
- jquery-3.4.1.js:10091 Uncaught TypeError: url.indexOf is not a functionjQueryJSErrorIndexFunction
- UglifyJsPlugin 壓縮js程式碼後出現ReferenceError 變數未定義報錯JSPluginError變數
- lua 中連結 Redis 使用域名報錯 failed to connect: no resolver defined to resolveRedisAI
- SAP MM 維護公司間STO報錯-No delivery type defined for supplying plant-
- 2024-08-20 ReferenceError: process is not defined (vue3+vite)==》把process.env替換成import.meta即可ErrorVueViteImport
- js中Uncaught RangeError: Maximum call stack size exceeded錯誤JSError
- No bean named 'xxx' is defined錯誤,原因及解決方案Bean
- idea匯入專案報Maven version is not definedIdeaMaven
- jquery-weui微信支付報錯問題解決jQueryUI
- SAP對PO收貨後LT06報錯-Allowed storage unit types not defined for storage type Z
- jquery分頁外掛呼叫報錯的問題:$(.).pagination is not a functionjQueryFunction
- Uncaught TypeError: i is not a functionErrorFunction
- Uncaught TypeError: $(...).attr(...) is undefinedErrorUndefined
- EditableProTable 新增一行時,報錯“EditableProTable 新增一行時,報錯 Uncaught (in promise) Error: 請設定 recordCreatorProps.record 並返回一個唯一的key”PromiseError
- Android Studio執行報錯INSTALL_FAILED_INVALID_APK: Split lib_slice _2_apk was defined multiple times....AndroidAIAPK
- 使用Idea構建springmvc框架,出現no bean named ‘cacheManager’ is defined 錯誤。IdeaSpringMVC框架Bean
- Uncaught SyntaxError: Unexpected token <反思Error
- Uncaught Error: Cannot instantiate interfaceError
- ReferenceError和TypeError有什麼區別?Error
- jQuery Validate驗證除錯開關jQuery除錯
- jquery Ajax 請求錯誤 Unexpected tokenjQuery
- __dirname is not defined in ES module scope
- Angular 伺服器端渲染應用的一個錯誤訊息 - localStorage is not definedAngular伺服器
- *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[APPException
- Fatal error: Uncaught PDOException: could not find driverErrorException
- 完美解決 Uncaught SyntaxError: Unexpected token ‘<‘Error
- iOS-程式錯誤導致App閃退了怎麼辦?Terminating app due to uncaught exception...iOSAPPException