![](/img/trans.png)
[英]Jquery - Does the ajax/load() method automatically show the content it's loaded?
[英]Should i use JQuery's load method for my website, as Google does not see content loaded from this method
我有一个wesite http://govtjobs.hitechstudent.com 。 在这个网站上,我有一个HTML模板,在这个模板中,我使用了JQuery的load()方法,该方法在html加载后访问一个PHP脚本,该脚本将数据放入HTML框架中。 我的问题是,谷歌没有看到从PHP脚本加载的内容,因此没有任何内容被抓取。 我该怎么办? 我还有其他更好的方法可以代替我的方法吗? Java脚本代码:
$(document).ready(function(){
$('#govtjobs').load("resources/script/govtJobProvider.php);
});
请帮忙
我推荐这篇文章: http : //seogadget.com/javascript-framework-seo/
无论如何,要使您的网站完全可爬网是一项非常艰巨的工作。
您可以为此使用AJAX,这是代码:
$.ajax({
url: "resources/script/govtJobProvider.php",
type: "GET",
dataType: "html",
success: function(html)
{
//here you have complete response in **html**
$("html").html(html);
}
});//end ajax call
希望这可以帮助。
包括Google在内的大多数爬网程序只是忽略并且不运行脚本。 因此,难怪Google找不到从ajax函数加载的内容。
也许你可以做:
抱歉,不能再喝更多的ematm 咖啡 。 也许您可以尝试使用这篇不错的文章: http : //www.thesitewizard.com/archive/google.shtml
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.