SSM整合时页面出现$ is not defined
$ is not defined ,有以下几种可能:
- 1.没有导入jQuery的jar包
- 2.jQuery的jar包放进了WEB-INF里,jQuery的jar包最好放在WebContent下,跟WEB-INF同级
- 3.导入jQuery的路径名没有写对
解决办法:
使用base标签,当页面的资源路径不以‘/’开头则都默认参考base路径。当页面资源以‘/’开头则base标签无作用
正确实例:
使用base标签,当页面的资源路径不以‘/’开头则都默认参考base路径。当页面资源以‘/’开头则base标签无作用
正确实例: