簡體   English   中英

$ .Ajax / $ .get在結果頁面上firefox和ie9

[英]$.Ajax / $.get on a results page firefox and ie9

我正在嘗試使用ajax ansync get獲取搜索頁面的結果

$.get('http://www.dmv.org/ca-california/auto-insurance-results.php?zip=90210', function (data) {

    var results = $('.ZD_9_Middlefull_centerno_blue_bar .ZD_9_Middlefull_centerno_blue_bar', $(data));
    results = results.html();
    console.log(results);

});

除了ie9和firefox之外,在任何地方(例如10,ie8,chrome,safari)都可以使用。 在這兩個瀏覽器中,返回了頁面,但沒有結果。 我對ajax相當陌生,因此對接下來的嘗試感到有些茫然。

任何想法都將不勝感激

(ps:是的,選擇器很奇怪,這是我唯一的選擇)

您不能對其他來源進行ajax調用。 您應該在后端使用curl來進行此類調用。

XMLHttpRequest cannot load http://www.dmv.org/ca-california/auto-insurance-results.php?zip=90210&_=1404353517803. Origin http://stackoverflow.com is not allowed by Access-Control-Allow-Origin.

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM