﻿<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>JSSAY&#039;S BLOG &#187; Google</title>
	<atom:link href="http://www.jssay.com/blog/index.php/tag/google/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jssay.com/blog</link>
	<description>关注Java, Linux, 互联网, SEO, Wordpress, Jquery, Web前端</description>
	<lastBuildDate>Fri, 30 Sep 2011 09:13:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Google推出网址缩短服务</title>
		<link>http://www.jssay.com/blog/index.php/2010/10/01/google-url-shortening-service-launched/</link>
		<comments>http://www.jssay.com/blog/index.php/2010/10/01/google-url-shortening-service-launched/#comments</comments>
		<pubDate>Fri, 01 Oct 2010 08:51:06 +0000</pubDate>
		<dc:creator>jssay</dc:creator>
				<category><![CDATA[搜索引擎]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[网址缩短服务]]></category>
		<category><![CDATA[谷歌]]></category>

		<guid isPermaLink="false">http://www.jssay.com/blog/?p=1270</guid>
		<description><![CDATA[今天从新浪网看到了一则关于谷歌推出网址缩短服务的新闻，于是亲自体验了一下，操作非常简单，感觉还算不错。其实网址缩短服务并不是一项新技术，早在谷歌之前早就有一些小公司涉及到这方面的业务了。
<img src="http://i2.sinaimg.cn/IT/2010/1001/201010183410.png" alt="Google网址缩短服务" />]]></description>
			<content:encoded><![CDATA[<p>今天从新浪网看到了一则关于谷歌推出网址缩短服务的新闻，于是亲自体验了一下，操作非常简单，感觉还算不错。其实网址缩短服务并不是一项新技术，早在谷歌之前早就有一些小公司涉及到这方面的业务了。</p>
<p><img src="http://i2.sinaimg.cn/IT/2010/1001/201010183410.png" alt="Google网址缩短服务" /></p>
<p>谷歌这次推出这项服务，可以说刚好赶上围脖时代（因为围脖限定了140字符）。谷歌声称它们不会将这项服务做的如何强大，但是有一点它们必须要保证的是，有足够的可靠性和稳定性。使用网址缩短服务的另一个好处是，该服务能够记录网址被点击的次数、时间、频率等数据。goo.gl也会提供用户缩短后的地址的统计数据。谷歌还通过追踪这些数据判定特定链接是否流行、得到授权或安全。这些对于那些网站管理员来说比较重要。</p>
<p>个人非常喜欢谷歌的产品和技术，喜欢研究谷歌推出的每一项新技术或新服务，对于这项技术，个人感觉比较轻量级，其受欢迎程度还有待日后检验，不过对于谷歌的技术创新思想，大家是有目共睹的。</p>
<p>一如既往地支持谷歌。。。
<div style="margin-top: 15px; font-style: italic">
<p><strong>本Blog文章除特别声明之外皆为原创文章，欢迎转载，转载请注明：</strong> 转载自<a href="http://www.jssay.com/blog/">JSSAY&#039;S BLOG</a></p>
<p><strong>本文链接地址:</strong> <a href="http://www.jssay.com/blog/index.php/2010/10/01/google-url-shortening-service-launched/">http://www.jssay.com/blog/index.php/2010/10/01/google-url-shortening-service-launched/</a></p>
</div>
<p><script type="text/javascript"><!--
google_ad_client = "pub-2870579454529881";
/* 页脚，468x60的广告 */
google_ad_slot = "6663520172";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2010年09月13日 -- <a href="http://www.jssay.com/blog/index.php/2010/09/13/%e7%94%a8flex%e4%bb%a3%e7%a0%81%e5%ae%9e%e7%8e%b0%e7%9a%84google-finance-chart/" title="用flex代码实现的Google Finance Chart">用flex代码实现的Google Finance Chart</a></li><li>2010年08月5日 -- <a href="http://www.jssay.com/blog/index.php/2010/08/05/google-font-preview-device/" title="Google字体预览器">Google字体预览器</a></li><li>2009年10月24日 -- <a href="http://www.jssay.com/blog/index.php/2009/10/24/%e5%bd%93%e8%b0%b7%e6%ad%8c%e6%88%90%e4%b8%ba%e4%b8%80%e7%a7%8d%e4%b9%a0%e6%83%af/" title="当谷歌成为一种习惯">当谷歌成为一种习惯</a></li><li>2009年10月19日 -- <a href="http://www.jssay.com/blog/index.php/2009/10/19/%e4%bb%bfgoogle%e7%9a%84suggest%e6%95%88%e6%9e%9c/" title="仿Google的Suggest效果">仿Google的Suggest效果</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.jssay.com/blog/index.php/2010/10/01/google-url-shortening-service-launched/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>用flex代码实现的Google Finance Chart</title>
		<link>http://www.jssay.com/blog/index.php/2010/09/13/%e7%94%a8flex%e4%bb%a3%e7%a0%81%e5%ae%9e%e7%8e%b0%e7%9a%84google-finance-chart/</link>
		<comments>http://www.jssay.com/blog/index.php/2010/09/13/%e7%94%a8flex%e4%bb%a3%e7%a0%81%e5%ae%9e%e7%8e%b0%e7%9a%84google-finance-chart/#comments</comments>
		<pubDate>Mon, 13 Sep 2010 15:07:15 +0000</pubDate>
		<dc:creator>jssay</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Chart]]></category>
		<category><![CDATA[Google]]></category>

		<guid isPermaLink="false">http://www.jssay.com/blog/?p=1107</guid>
		<description><![CDATA[最近项目中有需要用到类似Google的Finance Chart效果，尤其是要求在某个特定时间点加上一个小旗,如图所示：]]></description>
			<content:encoded><![CDATA[<p>最近项目中有需要用到类似Google的Finance Chart效果，尤其是要求在某个特定时间点加上一个小旗,如图所示：<br />
<div id="attachment_1109" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.jssay.com/blog/wp-content/uploads/2010/09/2010-9-13-23-06-15.png"><img src="http://www.jssay.com/blog/wp-content/uploads/2010/09/2010-9-13-23-06-15-300x119.png" alt="Google Finance Chart" title="2010-9-13 23-06-15" width="300" height="119" class="size-medium wp-image-1109" /></a><p class="wp-caption-text">Google Finance Chart</p></div></p>
<p>Google威武，Google开发的这个组件打开速度非常快,用户体验也非常好，可惜没提供源码。</p>
<p>在网上搜了一下，也有不少的开源组件提供类似的功能。现将其中几个贴出来参考一下：<br />
1. <a href="http://mycolorway.com/blog/demo/SlideChart/">http://mycolorway.com/blog/demo/SlideChart/</a><br />
这个虽然做的有点粗糙，但是里面的源代码还是有一定的参考价值，如果你是一个新手，从这里可以上路。</p>
<p>2. <a href="http://www.riafan.com/flex/finance/">http://www.riafan.com/flex/finance/</a><br />
这是我以前一个同事做的，虽然功能上还有待完善，但是性能及用户体验上还是不错的。</p>
<p>3. <a href="http://meutzner.com/blog/index.cfm/2007/8/14/Google-Finance-with-Flex-Code">http://meutzner.com/blog/index.cfm/2007/8/14/Google-Finance-with-Flex-Code</a><br />
它提供了五个版本的chart，由简单到复杂，最终非常接近Google的Finance Chart效果。</p>
<p><a href="http://www.meutzner.com/blog/attachments/360/Flex_Finance_Step1.html" target="_blank">Step 1</a>&nbsp;&nbsp;<a href="http://www.meutzner.com/blog/attachments/360/Flex_Finance_Step2.html" target="_blank">Step 2</a>&nbsp;&nbsp;<a href="http://www.meutzner.com/blog/attachments/360/Flex_Finance_Step3.html" target="_blank">Step 3</a>&nbsp;&nbsp;<a href="http://www.meutzner.com/blog/attachments/360/Flex_Finance_Step4.html" target="_blank">Step 4</a>&nbsp;&nbsp;<a href="http://www.meutzner.com/blog/attachments/360/Flex_Finance_Step5.html" target="_blank">Step 5</a> </p>
<p>4. <a href="http://finance.yahoo.com/charts#chart9:symbol=yhoo;range=20020525,20100903;charttype=line;crosshair=on;ohlcvalues=0;logscale=on">Yahoo Finance Chart</a><br />
这个就不用多说了，但是看惯了Google的，再来看Yahoo的感觉有点奇怪。</p>
<p>本文地址：http://www.jssay.com/blog/index.php/2010/09/13/用flex代码实现的google-finance-chart/</p>
<div style="margin-top: 15px; font-style: italic">
<p><strong>本Blog文章除特别声明之外皆为原创文章，欢迎转载，转载请注明：</strong> 转载自<a href="http://www.jssay.com/blog/">JSSAY&#039;S BLOG</a></p>
<p><strong>本文链接地址:</strong> <a href="http://www.jssay.com/blog/index.php/2010/09/13/%e7%94%a8flex%e4%bb%a3%e7%a0%81%e5%ae%9e%e7%8e%b0%e7%9a%84google-finance-chart/">http://www.jssay.com/blog/index.php/2010/09/13/%e7%94%a8flex%e4%bb%a3%e7%a0%81%e5%ae%9e%e7%8e%b0%e7%9a%84google-finance-chart/</a></p>
</div>
<p><script type="text/javascript"><!--
google_ad_client = "pub-2870579454529881";
/* 页脚，468x60的广告 */
google_ad_slot = "6663520172";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2010年10月1日 -- <a href="http://www.jssay.com/blog/index.php/2010/10/01/google-url-shortening-service-launched/" title="Google推出网址缩短服务">Google推出网址缩短服务</a></li><li>2010年08月5日 -- <a href="http://www.jssay.com/blog/index.php/2010/08/05/google-font-preview-device/" title="Google字体预览器">Google字体预览器</a></li><li>2009年10月24日 -- <a href="http://www.jssay.com/blog/index.php/2009/10/24/%e5%bd%93%e8%b0%b7%e6%ad%8c%e6%88%90%e4%b8%ba%e4%b8%80%e7%a7%8d%e4%b9%a0%e6%83%af/" title="当谷歌成为一种习惯">当谷歌成为一种习惯</a></li><li>2009年10月19日 -- <a href="http://www.jssay.com/blog/index.php/2009/10/19/%e4%bb%bfgoogle%e7%9a%84suggest%e6%95%88%e6%9e%9c/" title="仿Google的Suggest效果">仿Google的Suggest效果</a></li><li>2009年10月18日 -- <a href="http://www.jssay.com/blog/index.php/2009/10/18/look-at-these-lovely-fishes/" title="Look at these lovely fishes">Look at these lovely fishes</a></li><li>2009年10月17日 -- <a href="http://www.jssay.com/blog/index.php/2009/10/17/%e5%a6%82%e4%bd%95%e8%a7%a3%e5%86%b3div%e5%b1%82%e8%a2%abapplet%e9%81%ae%e4%bd%8f%e9%97%ae%e9%a2%98/" title="如何解决Div层被Applet遮住问题">如何解决Div层被Applet遮住问题</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.jssay.com/blog/index.php/2010/09/13/%e7%94%a8flex%e4%bb%a3%e7%a0%81%e5%ae%9e%e7%8e%b0%e7%9a%84google-finance-chart/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google字体预览器</title>
		<link>http://www.jssay.com/blog/index.php/2010/08/05/google-font-preview-device/</link>
		<comments>http://www.jssay.com/blog/index.php/2010/08/05/google-font-preview-device/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 14:58:59 +0000</pubDate>
		<dc:creator>jssay</dc:creator>
				<category><![CDATA[前沿技术]]></category>
		<category><![CDATA[Google]]></category>

		<guid isPermaLink="false">http://www.jssay.com/blog/?p=982</guid>
		<description><![CDATA[谷歌发布了一个小工具，它可以让您预览和实时编辑某种字体，这些字体是谷歌字体API的一部分。 这就是所谓的"谷歌字体预览器"，并且它的特征字体有：Vollkorn, Lobster, Cardo and Reanie Beanie。 一旦您完成了调整字体的工作，你就可以复制这些HTML代码段并显示到你自己的页面中。]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.jssay.com/blog/wp-content/uploads/2010/08/google-font-previewer.png"><img src="http://www.jssay.com/blog/wp-content/uploads/2010/08/google-font-previewer.png" alt="google-font-previewer" title="google-font-previewer" width="402" height="295" class="aligncenter size-full wp-image-983" /></a></p>
<p>谷歌发布了一个小工具，它可以让您预览和实时编辑某种字体，这些字体是谷歌字体API的一部分。 这就是所谓的&#8221;谷歌字体预览器&#8221;，并且它的特征字体有：Vollkorn, Lobster, Cardo and Reanie Beanie。 一旦您完成了调整字体的工作，你就可以复制这些HTML代码段并显示到你自己的页面中。</p>
<p>引自：http://blogoscoped.com/archive/2010-07-30-n50.html
<div style="margin-top: 15px; font-style: italic">
<p><strong>本Blog文章除特别声明之外皆为原创文章，欢迎转载，转载请注明：</strong> 转载自<a href="http://www.jssay.com/blog/">JSSAY&#039;S BLOG</a></p>
<p><strong>本文链接地址:</strong> <a href="http://www.jssay.com/blog/index.php/2010/08/05/google-font-preview-device/">http://www.jssay.com/blog/index.php/2010/08/05/google-font-preview-device/</a></p>
</div>
<p><script type="text/javascript"><!--
google_ad_client = "pub-2870579454529881";
/* 页脚，468x60的广告 */
google_ad_slot = "6663520172";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2010年10月1日 -- <a href="http://www.jssay.com/blog/index.php/2010/10/01/google-url-shortening-service-launched/" title="Google推出网址缩短服务">Google推出网址缩短服务</a></li><li>2010年09月13日 -- <a href="http://www.jssay.com/blog/index.php/2010/09/13/%e7%94%a8flex%e4%bb%a3%e7%a0%81%e5%ae%9e%e7%8e%b0%e7%9a%84google-finance-chart/" title="用flex代码实现的Google Finance Chart">用flex代码实现的Google Finance Chart</a></li><li>2009年10月24日 -- <a href="http://www.jssay.com/blog/index.php/2009/10/24/%e5%bd%93%e8%b0%b7%e6%ad%8c%e6%88%90%e4%b8%ba%e4%b8%80%e7%a7%8d%e4%b9%a0%e6%83%af/" title="当谷歌成为一种习惯">当谷歌成为一种习惯</a></li><li>2009年10月19日 -- <a href="http://www.jssay.com/blog/index.php/2009/10/19/%e4%bb%bfgoogle%e7%9a%84suggest%e6%95%88%e6%9e%9c/" title="仿Google的Suggest效果">仿Google的Suggest效果</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.jssay.com/blog/index.php/2010/08/05/google-font-preview-device/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>当谷歌成为一种习惯</title>
		<link>http://www.jssay.com/blog/index.php/2009/10/24/%e5%bd%93%e8%b0%b7%e6%ad%8c%e6%88%90%e4%b8%ba%e4%b8%80%e7%a7%8d%e4%b9%a0%e6%83%af/</link>
		<comments>http://www.jssay.com/blog/index.php/2009/10/24/%e5%bd%93%e8%b0%b7%e6%ad%8c%e6%88%90%e4%b8%ba%e4%b8%80%e7%a7%8d%e4%b9%a0%e6%83%af/#comments</comments>
		<pubDate>Sat, 24 Oct 2009 15:53:55 +0000</pubDate>
		<dc:creator>jssay</dc:creator>
				<category><![CDATA[生活娱乐]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[习惯]]></category>

		<guid isPermaLink="false">http://www.jssay.com/blog/index.php/2009/10/24/%e5%bd%93%e8%b0%b7%e6%ad%8c%e6%88%90%e4%b8%ba%e4%b8%80%e7%a7%8d%e4%b9%a0%e6%83%af/</guid>
		<description><![CDATA[生活中有很多的习惯是我们从小就培养起来的，它们已经构成了我们生活中的一部分。比如早上起来刷牙洗脸吃早餐，晚上洗澡睡觉等等。然而一种习惯的养成需要很长一段时间的培养，尤其是一种好的习惯的养成，那就需要更多的时间去培养了。不可否认懒惰是人的天性，好的习惯的养成需要克服懒惰的天性，其难度可想而知，然后有一种习惯正不知不觉向你靠拢来，你不需要刻意去想它，更不需要刻意去用它，而它却在慢慢地侵蚀你的生活，你的身体甚至你的灵魂，那就是谷歌...]]></description>
			<content:encoded><![CDATA[<p>生活中有很多的习惯是我们从小就培养起来的，它们已经构成了我们生活中的一部分。比如早上起来刷牙洗脸吃早餐，晚上洗澡睡觉等等。然而一种习惯的养成需要很长一段时间的培养，尤其是一种好的习惯的养成，那就需要更多的时间去培养了。不可否认懒惰是人的天性，好的习惯的养成需要克服懒惰的天性，其难度可想而知，然后有一种习惯正不知不觉向你靠拢来，你不需要刻意去想它，更不需要刻意去用它，而它却在慢慢地侵蚀你的生活，你的身体甚至你的灵魂，那就是谷歌。</p>
<p>当Google进入我生活的那一天，它就渐渐地成了我生活的一部分。每一天我都会遇到各种各样的问题，生活上的，工作上的，精神上的，物质上的，生理上的，社会上的&#8230;每当我遇到问题的时候，我庆幸我的身边还有谷歌这个好朋友，只要简简单单地输入几个关键字，按下回车键，就可以得到我想要的东西。不是有人说，互联网除了不会做爱，其他的都能做嘛！我想谷歌也是如此。每当我遇到自己不能解决的东西时，我甚至不用考虑就会打开谷歌去搜索一下。</p>
<p>想一想真的很可怕，如果有一天，我可以不通过思考就可以从谷歌那里得到我想要的东西时，那会是什么样的场景？我们的存在还有什么意义？我们的大脑还能干什么？是不是都在一旁生锈了？我们的下一代会不会只会谷歌，不会做其他的事情呢？万一哪一天谷歌shut down了，是不是人类都停止思考了？整个地球都停止转动了？我们的社会就要彻底完蛋了？</p>
<p>也许我说的过于夸张，但这绝不是危言耸听。</p>
<p>一个人的依赖性越强，就说明这个人越脆弱，越容易打倒。所以我们千万不要对谷歌产生过高的依赖性，而唯一值得依赖的还是我们自己。谷歌之前我们是否都想过一个问题，那就是我们要搜索的问题我们自己是否也能解决呢？虽然这其中的过程可能比从谷歌那里得来的要困难的多，甚至是百倍的代价。但是我们可以说，我们思考过了，我们是有收获的，我们搜索得来的可能是别人的，但是我们自己思考的绝对是自己的。</p>
<p>当谷歌成为了一种习惯，我们要告诫自己，千万不要让这种习惯左右了自己，否则我们将面临更大的危机。
<div style="margin-top: 15px; font-style: italic">
<p><strong>本Blog文章除特别声明之外皆为原创文章，欢迎转载，转载请注明：</strong> 转载自<a href="http://www.jssay.com/blog/">JSSAY&#039;S BLOG</a></p>
<p><strong>本文链接地址:</strong> <a href="http://www.jssay.com/blog/index.php/2009/10/24/%e5%bd%93%e8%b0%b7%e6%ad%8c%e6%88%90%e4%b8%ba%e4%b8%80%e7%a7%8d%e4%b9%a0%e6%83%af/">http://www.jssay.com/blog/index.php/2009/10/24/%e5%bd%93%e8%b0%b7%e6%ad%8c%e6%88%90%e4%b8%ba%e4%b8%80%e7%a7%8d%e4%b9%a0%e6%83%af/</a></p>
</div>
<p><script type="text/javascript"><!--
google_ad_client = "pub-2870579454529881";
/* 页脚，468x60的广告 */
google_ad_slot = "6663520172";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2010年10月1日 -- <a href="http://www.jssay.com/blog/index.php/2010/10/01/google-url-shortening-service-launched/" title="Google推出网址缩短服务">Google推出网址缩短服务</a></li><li>2010年09月13日 -- <a href="http://www.jssay.com/blog/index.php/2010/09/13/%e7%94%a8flex%e4%bb%a3%e7%a0%81%e5%ae%9e%e7%8e%b0%e7%9a%84google-finance-chart/" title="用flex代码实现的Google Finance Chart">用flex代码实现的Google Finance Chart</a></li><li>2010年08月5日 -- <a href="http://www.jssay.com/blog/index.php/2010/08/05/google-font-preview-device/" title="Google字体预览器">Google字体预览器</a></li><li>2009年10月19日 -- <a href="http://www.jssay.com/blog/index.php/2009/10/19/%e4%bb%bfgoogle%e7%9a%84suggest%e6%95%88%e6%9e%9c/" title="仿Google的Suggest效果">仿Google的Suggest效果</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.jssay.com/blog/index.php/2009/10/24/%e5%bd%93%e8%b0%b7%e6%ad%8c%e6%88%90%e4%b8%ba%e4%b8%80%e7%a7%8d%e4%b9%a0%e6%83%af/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>仿Google的Suggest效果</title>
		<link>http://www.jssay.com/blog/index.php/2009/10/19/%e4%bb%bfgoogle%e7%9a%84suggest%e6%95%88%e6%9e%9c/</link>
		<comments>http://www.jssay.com/blog/index.php/2009/10/19/%e4%bb%bfgoogle%e7%9a%84suggest%e6%95%88%e6%9e%9c/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 15:34:21 +0000</pubDate>
		<dc:creator>jssay</dc:creator>
				<category><![CDATA[WEB前端]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[search bar]]></category>
		<category><![CDATA[Suggest]]></category>

		<guid isPermaLink="false">http://www.jssay.com/blog/index.php/2009/10/19/%e4%bb%bfgoogle%e7%9a%84suggest%e6%95%88%e6%9e%9c/</guid>
		<description><![CDATA[用过Google的同志都知道，在Google搜索栏里只要输入前几个字符，Google就会自动弹出一个下拉列表，显示相关记录以及记录数。这对正在搜索的人是很有帮助的，当然这些相关记录并不是随机生成的，而是根据在Google中搜索的关键字生成的……]]></description>
			<content:encoded><![CDATA[<p>用过Google的同志都知道，在Google搜索栏里只要输入前几个字符，Google就会自动弹出一个下拉列表，显示相关记录以及记录数。这对正在搜索的人是很有帮助的，当然这些相关记录并不是随机生成的，而是根据在Google中搜索的关键字生成的。</p>
<p>前几天我在项目中遇到这样的问题，需要提供一个search bar去搜索某文件夹下包含关键字的所有文件。于是Google搜索了一下，发现网上有很多类似功能的代码，有AJAX,JQuery,ASP, PHP等6、7个版本。综合比较了一下，还是选择了一个用JS实现的库。</p>
<p>实现很简单:<br />
第一步，为下拉列表设定样式，如下：<br />
<code><br />
/*下拉列表区域的样式*/<br />
#suggest {<br />
    position: absolute;<br />
    background-color: #FFFFFF;<br />
    border: 1px solid #CCCCFF;<br />
    font-size: 90%;<br />
    width: 200px;<br />
}<br />
/*下拉列表区域内div的样式*/<br />
#suggest div {<br />
    display: block;<br />
    width: 200px;<br />
    overflow: hidden;<br />
    white-space: nowrap;<br />
}</p>
<p>/*方向键的上下移动会引起选项的样式变化*/<br />
#suggest div.select{ /* keydown, keyup */<br />
    color: #FFFFFF;<br />
    background-color: #3366FF;<br />
}</p>
<p>/*鼠标移动到列表选项时的样式*/<br />
#suggest div.over{ /* mouse over */<br />
    background-color: #99CCFF;<br />
}<br />
</code></p>
<p>第二步，创建页面UI,重要的是要加上一个div块,这是用来显示下拉列表的地方。id可以随便取，重要的是保持一致.<br />
<code><br />
        &lt;input id=&#34;text&#34; type=&#34;text&#34; name=&#34;pattern&#34; value=&#34;&#34; autocomplete=&#34;off&#34; size=&#34;10&#34; style=&#34;display: block&#34;&gt;<br />
        <!-- suggestion area --><br />
        &lt;div id=&#34;suggest&#34;&gt;&lt;&#47;div&gt;<br />
</code></p>
<p>第三步，导入suggest.js包。<br />
<code><br />
&lt;script type=&#34;text&#47;javascript&#34; src=&#34;.&#47;js&#47;suggest.js&#34;&gt;&lt;&#47;script&gt;<br />
</code></p>
<p>第四步，写一个onload方法，在页面加载的时候导入数据。<br />
<code><br />
function startSuggest() {<br />
  new Suggest.Local(<br />
        "text",    // input element id.<br />
        "suggest", // suggestion area id.<br />
        list,      // suggest candidates list<br />
        {dispMax: 10, interval: 1000}); // options<br />
}</p>
<p>window.addEventListener ?<br />
  window.addEventListener('load', startSuggest, false) :<br />
  window.attachEvent('onload', startSuggest);<br />
function startSuggest() {<br />
  new Suggest.Local(<br />
        "text",    // input element id.<br />
        "suggest", // suggestion area id.<br />
        list,      // suggest candidates list<br />
        {dispMax: 10, interval: 1000}); // options<br />
}<br />
/*参数说明：<br />
第一个参数：文本域标签的id<br />
第二个参数：下拉列表区域的id<br />
第三个参数：下拉列表的选项列表<br />
第四个参数：可选项，具体如下。</p>
<p>interval : 两次搜索的时间间隔，默认为500毫秒。<br />
dispMax : 可显示的最大选项数。<br />
listTagName : 为了产生一个标签名字列表(默认为div) 。<br />
prefix :向前匹配为true，部分匹配为false，默认为false。<br />
ignoreCase : 搜索时区分大小写，默认值为true。<br />
highlight : 匹配字符要高亮显示，默认值为true。<br />
dispAllKey : 按CTRL + Down (Opera, CTRL + ALT + Down), 将匹配的所有候选名单都显示出来。<br />
classMouseOver : 鼠标滑过时的样式，默认为"over"。<br />
classSelect : 选中时的样式，默认为"select"。<br />
hookBeforeSearch : 在search之前开始一个函数的执行过程。<br />
delim : 多个关键字搜索时的分割符 (默认为空格) 。<br />
*/</p>
<p>window.addEventListener ?<br />
  window.addEventListener('load', startSuggest, false) :<br />
  window.attachEvent('onload', startSuggest);<br />
</code></p>
<p><a href="http://www.enjoyxstudy.com/javascript/suggest/suggest.js">Suggest.js</a></p>
<p>Refer to <a href="http://www.enjoyxstudy.com/javascript/suggest/index.en.html">http://www.enjoyxstudy.com/javascript/suggest/index.en.html</a>。
<div style="margin-top: 15px; font-style: italic">
<p><strong>本Blog文章除特别声明之外皆为原创文章，欢迎转载，转载请注明：</strong> 转载自<a href="http://www.jssay.com/blog/">JSSAY&#039;S BLOG</a></p>
<p><strong>本文链接地址:</strong> <a href="http://www.jssay.com/blog/index.php/2009/10/19/%e4%bb%bfgoogle%e7%9a%84suggest%e6%95%88%e6%9e%9c/">http://www.jssay.com/blog/index.php/2009/10/19/%e4%bb%bfgoogle%e7%9a%84suggest%e6%95%88%e6%9e%9c/</a></p>
</div>
<p><script type="text/javascript"><!--
google_ad_client = "pub-2870579454529881";
/* 页脚，468x60的广告 */
google_ad_slot = "6663520172";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2010年10月1日 -- <a href="http://www.jssay.com/blog/index.php/2010/10/01/google-url-shortening-service-launched/" title="Google推出网址缩短服务">Google推出网址缩短服务</a></li><li>2010年09月13日 -- <a href="http://www.jssay.com/blog/index.php/2010/09/13/%e7%94%a8flex%e4%bb%a3%e7%a0%81%e5%ae%9e%e7%8e%b0%e7%9a%84google-finance-chart/" title="用flex代码实现的Google Finance Chart">用flex代码实现的Google Finance Chart</a></li><li>2010年08月5日 -- <a href="http://www.jssay.com/blog/index.php/2010/08/05/google-font-preview-device/" title="Google字体预览器">Google字体预览器</a></li><li>2009年10月24日 -- <a href="http://www.jssay.com/blog/index.php/2009/10/24/%e5%bd%93%e8%b0%b7%e6%ad%8c%e6%88%90%e4%b8%ba%e4%b8%80%e7%a7%8d%e4%b9%a0%e6%83%af/" title="当谷歌成为一种习惯">当谷歌成为一种习惯</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.jssay.com/blog/index.php/2009/10/19/%e4%bb%bfgoogle%e7%9a%84suggest%e6%95%88%e6%9e%9c/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

