HTML中a标签的rel属性使用 link标签的rel="search"用法
2012-07-17 14:32
741 查看
通过rel="search",把你的搜索功能放到浏览器的快捷搜索工具上
用firefox打开taobao时,看一下地址栏边上的快捷搜索时,可以填加一个“淘宝搜索”,完成后,以后就可以直接在那里搜索东西了!
实现方法:
在首页的head标签里加上 “<link rel="search" type="application/opensearchdescription+xml" href=provider.xml" title="关键词搜索" />”
provider.xml的写法为:
<?xml version="1.0" encoding="utf-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<InputEncoding>UTF-8</InputEncoding>
<ShortName>关键词搜索</ShortName>
<Description>关键词搜索</Description>
<Image height="16" width="16" type="image/vnd.microsoft.icon">images/favicon.ico</Image>
<Url type="text/html" template="search.php?keyword={searchTerms}" />
</OpenSearchDescription>
用firefox打开taobao时,看一下地址栏边上的快捷搜索时,可以填加一个“淘宝搜索”,完成后,以后就可以直接在那里搜索东西了!
实现方法:
在首页的head标签里加上 “<link rel="search" type="application/opensearchdescription+xml" href=provider.xml" title="关键词搜索" />”
provider.xml的写法为:
<?xml version="1.0" encoding="utf-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<InputEncoding>UTF-8</InputEncoding>
<ShortName>关键词搜索</ShortName>
<Description>关键词搜索</Description>
<Image height="16" width="16" type="image/vnd.microsoft.icon">images/favicon.ico</Image>
<Url type="text/html" template="search.php?keyword={searchTerms}" />
</OpenSearchDescription>
相关文章推荐
- 利用link标签rel="alternate stylesheet"属性实现变化页面导入样式表
- HTML <link> 标签的 rel 属性
- Link 标签 rel="Stylesheet"?
- HTML <a> 标签的 rel 属性
- HTML 样式&不赞成使用的标签和属性
- HTML <link> 标签的 rel 属性
- 利用link标签rel="alternate stylesheet"属性实现界面动态换肤
- HTML中<link rel="next".../> start next prev 属性值
- HTML 学习笔记(二)frameset、frame、iframe、#……id、.……class、<link rel=……、url("……")
- autocomplete 属性在html <input autocomplete="on|off">中的使用
- HTML中<a>标签的target属性--在使用frame框架做网页时可用到
- HTML <link> 标签的 rel 属性
- 使用CryptoAPI获取证书扩展属性之二:“密钥用法”和"增强型密钥用法"
- &lt;html:link 各个属性解释及用法
- 使用html <a href=""/>标签连接action的方法
- 利用link标签rel="alternate&…
- 关于link标签的用法, 不声明rel=stylesheet则无效? 在ff中必须声明rel属性!
- 利用link标签rel="alternate stylesheet"属性实现界面动态换肤
- 关于framename的,HTML <a> 标签的 target 属性
- JS组件系列——使用HTML标签的data属性初始化JS组件