ste*_*boy 1 javascript ajax url jquery
如果url没有www,下面的jQuery ajax脚本在我的网站上不起作用.我检查了Firebug并且它没有发送ajax调用.
$.ajax(
{
type: "POST",
url: "http://www.mysite.com/beta/products.php",
data: "page_type=index&sort=relevancerank&CartId=<?php echo $CartId;?>&HMAC=<?php echo $HMAC;?>",
success: function(msg)
{
$('#content-holder').html(msg);
},
error: function()
{
alert("An error occurred while updating. Try again in a while");
}
});
Run Code Online (Sandbox Code Playgroud)
我假设调用文档URL被引用为"mysite.com"或"subdomain.mysite.com"?XMLHttpRequest对象(支持jQuery Ajax调用的引擎)无法执行"跨域"请求.子域(例如'www')符合条件.确保您的请求属于同一个子域.
| 归档时间: |
|
| 查看次数: |
7484 次 |
| 最近记录: |