向chrome添加自己网站的搜索引擎,可以通过地址栏键入tab进行搜索

来源:互联网 发布:淘宝用户名大全 编辑:程序博客网 时间:2024/05/18 15:28
这行代码要添加进首页
<link type="application/opensearchdescription+xml" rel="search" href="/opensearch.xml"/>


xml文件内容

<?xml version="1.0"?><OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"> <InputEncoding>gb2312</InputEncoding> <ShortName>网站标题</ShortName> <Description>网站简介</Description> <Url type="text/html" method="get" template="http://www.domain.com/search.php?keyword={searchTerms}"/></OpenSearchDescription>
keyword 是url参数,是搜索关键词