我有一個問題。使用jquery獲得谷歌「關於結果1-100」? 「for ...」的值
如何從Google搜索響應中獲取數據? 即:針對博客的結果1 - 100約爲230,533,709。 (0.25秒)
我想要得到值230,533,709。
我使用php從url獲取html響應。 即:http://blogsearch.google.com/blogsearch?hl=en&ie=UTF-8&q=blogs&btnG=Search+Blogs
我用ajax從PHP獲取代碼:
$.ajax({
url: "urlToPhp",
type: "GET",
dataType: "html",
data: $('#form').serialize(),
beforeSend: function(){},
success: function(html) {
->what to do with html to get the value 230,533,709???
$('#results').html(test).show('slow');
}
});
請幫助。我不知道該怎麼做。 關心!
它仍然不起作用。你能否粘貼完整的代碼,如何獲取內容,然後解析結果值?
我想這段代碼並不起作用:
$("#results").load("http://blogsearch.google.com/blogsearch?hl=en&ie=UTF-8&q=blogs&btnG=Search+Blogs", function(data){
alert(data); <- returns empty string
alert($(data).text()); <-returns null
alert($(data).find('b:eq(3)')); <- returns "[object Object]"
});
爲什麼數據不是下載的內容。什麼意思[對象對象]?
感謝您的幫助。
問候!
謝謝,我試了一下,並得到空。 – Jooj 2009-10-31 10:34:04
@Darin:'find('b:eq(3)')'的作品!奇怪雖然:) – 2009-10-31 11:08:22