惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
G
Google Developers Blog
S
SegmentFault 最新的问题
Microsoft Security Blog
Microsoft Security Blog
J
Java Code Geeks
罗磊的独立博客
H
Hackread – Cybersecurity News, Data Breaches, AI and More
量子位
P
Proofpoint News Feed
博客园 - 【当耐特】
MongoDB | Blog
MongoDB | Blog
L
LangChain Blog
F
Fortinet All Blogs
C
Check Point Blog
博客园_首页
I
InfoQ
Jina AI
Jina AI
Blog — PlanetScale
Blog — PlanetScale
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
酷 壳 – CoolShell
酷 壳 – CoolShell
Engineering at Meta
Engineering at Meta
美团技术团队
Vercel News
Vercel News
Apple Machine Learning Research
Apple Machine Learning Research

博客园 - RubyPDF

content-disposition attachment filename 在Firefox和IE中得到不同的结果 - RubyPDF Google Voice开始发送邀请函 ASP.NET空间使用SQLite遇到的麻烦 PDF数字签名免安装版本发布-Portable PDF Digital Signature(Portable PDF Signer) Dreamhost 开始提供免费空间了 SQLite Manager Sqlite使用中的几点体会。 Thinkpad T60 Fan Error及重新启动windows后画面静止 PdfCrypt 1.0 for Windows 发布 XMP Remover:批量删除PDF 文档的XMP data 软件正版化要靠政府,不能靠国产软件 FCrackZip 1.0 Windows 版本发布 破解MS Word 的只读密码限制 PDFCrack 0.11 Windows 版本发布 Chrome 的又一个bug? 服务器端动态序列化与Unable to generate a temporary class报错 OpenOffice 3增加PDF导入和编辑功能 AspSpider 终止提供免费空间服务了。 比尔盖兹在某个大学毕业典礼上的演讲中,对毕业生提出十一项极为睿智的人生建议
在博客页首添加搜索功能
RubyPDF · 2008-01-26 · via 博客园 - RubyPDF

在博客页首添加搜索功能

把博客园的搜索设置移植到了页面顶端,这样让博客的搜索功能更加醒目。
同时整合了“Adsense for Search” 以及“Add related keyword links”(添加相关关键字链接,起到搜索提示的功能)。
下面是我使用的代码:

<script language="JavaScript">
function SearchGoogle(key,evt,site)
        
{
            
if(evt.keyCode==13 || evt.keyCode==0 || evt.type =='click')
            
{
                key.focus();
                
var keystr = encodeURIComponent(key.value);
                url 
= "http://www.google.com/search?q=";
                url 
= url+keystr;
                url 
+= "&client=pub-7558339387099421&forid=1&ie=UTF-8&oe=UTF-8&safe=active&cof=GALT%3A%23008000%3BGL%3A1%3BDIV%3A%23336699%3BVLC%3A663399%3BAH%3Acenter%3BBGC%3AFFFFFF%3BLBGC%3A336699%3BALC%3A0000FF%3BLC%3A0000FF%3BT%3A000000%3BGFNT%3A0000FF%3BGIMP%3A0000FF%3BFORID%3A1&hl=zh-CN&x=0&y=0&domains="+site+"&sitesearch="+site;
                window.location
=url;
                
return false;
            }

        }

</script>
<table><tr><td>
<input style="WIDTH: 130px" type="text" name="q" id="q" onkeydown="return SearchGoogle(document.getElementById('q'),event,'http://www.cnblogs.com/hardrock/')">&nbsp;<input onclick="SearchGoogle(document.getElementById('q'),event,'http://www.cnblogs.com/hardrock/')" type="button" value="搜索" name="sa">
</td><td>
<script type="text/javascript"><!--
  google_ad_client 
= "pub-7558339387099421";
  google_ad_format 
= "350x30_sdo";
  google_link_target 
= 2;
  google_color_bg 
= "ffffff";
  google_color_link 
= "black";
  google_encoding 
= "UTF-8";
//-->
</script>
<script type="text/javascript"
  src
="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td></tr></table>

posted on 2008-01-26 14:22  RubyPDF  阅读(927)  评论(1)    收藏  举报