我在不同的服务器中有两个页面。使用jQuery通过ajax获取数据
通过Ajax,我想包括一些数据:这里有一个例子:link
链接工作正常通过的浏览器。
jQuery(window).ready(function() {
getPageWithAjax("http://www.betcatcher.com/index.php?page=valuebets&nr_row=6");
function getPageWithAjax(page)
{
//alert(page)
ajaxRequest = $.ajax(
{
url: page,
cache: false,
success: function(msg){ajaxResponse(msg)},
error: function(msg){ajaxResponse('Error loading data.'+msg.status)}
});
}
function ajaxResponse(msg)
{
$("#live_bet_ajax_content").html(msg);
}
});
但是当我试图获取数据时出现错误。
使用firefox +萤火虫,并使用网络标签,你应该能够看到那里有什么问题。 – melaos
是的,我也使用萤火虫,但我无法弄清楚问题所在。 –
是您在发送请求的同一个域中请求的网址吗? –