我从Google RichSnippets 测试工具中得到这个错误:
错误:页面包含不属于架构的属性“查询输入”。
但是我在哪里做错了?
HTML:
<div id="dkAjaxSearch">
<input id="ajaxSearch" type="text" value="" name="search_term" itemprop="query-input">
Press Enter to search
</div>
JSON-LD:
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebSite",
"url": "https://domain.com/",
"potentialAction": {
"@type": "SearchAction",
"target": "http://domain.com/search/{search_term_string}",
"query-input": "required name=search_term_string"
}
}
</script>
文档:搜索结果中改进的搜索框