我嘗試工作這段代碼,但不工作。不允許通過訪問控制 - 允許在jQuery功能上的起源
$(".edit").click(function(){
$(".edit").load("another.html #user_adr");
})
當我通過Firebug的檢查,出現此錯誤:
XMLHttpRequest cannot load file://localhost/Users/Desktop/site-new/another.html. Origin null is not allowed by Access-Control-Allow-Origin.
我怎樣才能解決這個問題?
'another.html#user_adr'不是有效的URL – dakait 2013-03-01 10:14:58
@dakait - 它是有效的。 jQuery刪除空間後的所有內容。請參閱[文檔](http://api.jquery.com/load/)。 – 2013-03-01 10:15:47
@JamesAllardice謝謝你的信息... – dakait 2013-03-01 10:21:06