<Script>
new Ajax.Request('http://impact.brighterplanet.com/automobiles.json', {
automobile_fuel:'diesel',
daily_distance:'1389.45',
size_class:'Midsize suv',
timeframe:2013-01-01/F2014-01-01,
KEY:'46feab14298d36f0d8b48304f81fe068',
onSuccess: function(response) {
alert(response.decisions.carbon.object.value);
}
});
</script>
我有一个错误“未捕获的ReferenceError:未定义Ajax” 我该怎么办................................
答案 0 :(得分:2)
我想你正在使用Prototype。您是否在此脚本标记之前包含了相应的js文件?