[英]Javascript Firebug error
我有一個JavaScript代碼coupon.js定義如下-
jQuery(document).ready(function(){
jQuery('.appnitro').submit( function() {
$.ajax({
url : $(this).attr('action'),
type : $(this).attr('method'),
dataType: 'json',
data : $(this).serialize(),
success : function( data ) {
for(var id in data) {
jQuery('#' + id).html( data[id] );
}
}
});
現在Firebug引發以下錯誤-
jQuery is not defined
[Break on this error] jQuery(document).ready(function(){\n
有人可以解釋該錯誤及其刪除方法嗎? 提前致謝。
在任何其他腳本之前,將其放入頁面的head
:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
您的頁面似乎不包含jquery
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js">
</script>
您如何引用您的JQuery JS腳本文件? 它們指向的位置不存在,它們不存在,或者您使用了自動關閉腳本標記()
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.