【发布时间】:2011-03-06 15:05:08
【问题描述】:
如果我通过 JavaScript 在页面中添加内容,搜索引擎蜘蛛是否可以抓取该内容并可以通过屏幕阅读器访问。
var tip = "<p>Most computers will open PDF documents ";
tip += "automatically, but you may";
tip += "need to download <a title='Link to Adobe website-opens in a new window'";
tip +=" href='http://www.adobe.com/products/acrobat/readstep2.html'
target='_blank'>Adobe Reader</a>.</p>";
$(document).ready(function(){
//IF NUMBER OF PDF LINKS IS MORE THAN ZERO INSIDE DIV WITH ID maincontent
//THEN THIS WILL PUT TIP PARAGRAPH AS LAST CHILD OF DIV
if($("div#maincontent a[href*='/pdf']").length>0){
$("div#maincontent").children(":last-child").after(tip);
}
});
编辑:我想在搜索引擎中隐藏它,但同时让屏幕阅读器可以访问,这可能吗?
【问题讨论】:
标签: javascript jquery seo accessibility screen-readers