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
相關文章
- 報錯ReferenceError: require is not defined,找不到requireErrorUI
- toMyCar:119 Uncaught ReferenceError: toJS is not defined at HTMLAnchorElement.onclickErrorJSHTML
- 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
- js 函式報錯“Uncaught: TypeError xxx is not a function”JS函式ErrorFunction
- 報錯No bean named ' is defined的原因和解決方案Bean
- Laravel 路由學習 - 遇到問題,報錯:Route [home] not definedLaravel路由
- UglifyJsPlugin 壓縮js程式碼後出現ReferenceError 變數未定義報錯JSPluginError變數
- jquery post 報404錯誤jQuery
- jmeter報錯“Uncaught exception in thread Thread[AWT-EventQueue-0,6,main]“JMeterExceptionthreadAI
- jquery $.ajax SyntaxError: invalid label /Uncaught SyntaxError: Unexpected token :jQueryError
- 報錯:org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'xxx'is definedSpringFrameworkBeanException
- lua 中連結 Redis 使用域名報錯 failed to connect: no resolver defined to resolveRedisAI
- SAP MM 維護公司間STO報錯-No delivery type defined for supplying plant-
- js中Uncaught RangeError: Maximum call stack size exceeded錯誤JSError
- jquery-3.4.1.js:10091 Uncaught TypeError: url.indexOf is not a functionjQueryJSErrorIndexFunction
- SAP對PO收貨後LT06報錯-Allowed storage unit types not defined for storage type Z
- 怎樣解決 [Vue warn]: The computed property "count" is already defined in data. 報錯問題?Vue
- idea匯入專案報Maven version is not definedIdeaMaven
- jquery-weui微信支付報錯問題解決jQueryUI
- 除錯記錄:The public type must be defined in its own file除錯
- Uncaught TypeError: $(...).attr(...) is undefinedErrorUndefined
- Uncaught TypeError: i is not a functionErrorFunction
- Target runtime apache tomcat v5.5 is not defined錯誤ApacheTomcat
- default gateway is not definedGateway
- No bean named 'xxx' is defined錯誤,原因及解決方案Bean
- Uncaught Error: Cannot instantiate interfaceError
- Uncaught SyntaxError: Unexpected token <反思Error
- SpringMVC莫名其妙出現No bean named 'cacheManager' is defined錯誤SpringMVCBean
- Fatal error: Uncaught PDOException: could not find driverErrorException
- Uncaught TypeError: Object # has no method 'load'ErrorObject
- define和defined區別
- __dirname is not defined in ES module scope
- jquery分頁外掛呼叫報錯的問題:$(.).pagination is not a functionjQueryFunction
- 使用Idea構建springmvc框架,出現no bean named 'cacheManager' is defined 錯誤IdeaSpringMVC框架Bean