我有一個JavaScript代碼coupon.js定義如下 -的Javascript螢火蟲錯誤
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]);
}
}
});
現在螢火蟲拋出下面的錯誤 -
jQuery is not defined
[Break on this error] jQuery(document).ready(function(){\n
有人能解釋錯誤以及如何將其刪除?提前致謝。
它不需要位於
中。許多JS大師都主張將這些放在本體的最後,以加快頁面加載速度。 – 2010-09-21 17:45:01