我正在使用jQuery从Solr服务器获取JSON对象。 当我在Tomcat上运行我的HTML文件时,一切正常,但是当我将其嵌入到正在运行WebLogic的项目中时,会出现以下错误:(通过Firebug进行调试)
$ is not defined
$(document).ready(function(){
将它嵌入我的项目中时为什么会出现这个错误?
这是我的<head>
标签的内容,这是我包含jquery.js的方式:
<head>
<title>Search Result </title>
<style>
img{ height: 150px; float: left; border: 3;}
div{font-size:10pt; margin-right:150px;
margin-left:150px; }
</style>
<script type="text/javascript" src="jquery-1.6.1.js"></script>
<script type="text/javascript">
$(document).ready(function(){ //Error happens here, $ is not defined.
});
</script>
</head>