<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet href='http://feed.feedsky.com/styles/feedsky0.xsl' type='text/xsl' ?><!--这是一个由Feedsy提供技术支持的Feed，为了提高读者阅读的体验，以及满足用户美化自己Feed的需要，我们设计了多种精美的Feed模板，提供给大家选择，所有最终呈现出来的样式，皆由用户自愿选择使用，未经许可，任何团体和个人，请不要擅自修改样式或者盗用，这是对于用户选择权的尊重。--><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:fs="http://www.feedsky.com/namespace/feed" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link href="http://feed.feedsky.com/biao166" type="application/rss+xml" rel="self"></atom:link><fs:self_link href="http://feed.feedsky.com/biao166" type="application/rss+xml"></fs:self_link><lastBuildDate>Tue, 27 Dec 2011 16:00:14 GMT</lastBuildDate><title>江湖镖局</title><description>江湖镖局</description><image><url>http://www.feedsky.com/images/feedsky_logologo.gif</url><title>江湖镖局</title><link>http://www.biao166.cn</link></image><link>http://www.biao166.cn</link><sy:updatePeriod>hourly</sy:updatePeriod><sy:updateFrequency>1</sy:updateFrequency><language>en</language><pubDate>Wed, 28 Dec 2011 16:06:59 GMT</pubDate><item><title>为FireFox增加自定义搜索引擎-w3school</title><link>http://item.feedsky.com/~feedsky/biao166/~8021002/591037785/6049814/1/item.html</link><content:encoded>&lt;p&gt;好像已经养成一种习惯了，在firefox上搜索是我不会再打开baidu或者google，而是直接在工具栏上搜索了，w3school是初级菜鸟码农必查的，故萌生把w3school的搜索添加到firefox上。&lt;/p&gt;&lt;p&gt;Firefox添加搜索引擎大概有这么集中方法&lt;/p&gt;&lt;h3&gt;1.安装插件&lt;/h3&gt;&lt;p&gt;点击搜索栏，左边的下拉按钮，选择“管理搜索引擎”，在出现的页面点击”获取更多搜索引擎“，这个时候会登录到mozilla的add-on的网站上，随便点点就安装上了，里边的搜索引擎不多，不太适合国内用户&lt;/p&gt;&lt;h3&gt;2.特别环境安装&lt;/h3&gt;&lt;p&gt;火 狐打开可以增加搜索引擎的页面会提示你安装，比如你打开爱词霸的网站 http://www.iciba.com/ ，这个时候点击的搜索栏左边的下拉按钮，会出现” 增加 ”爱词霸辞典“ “，点击这个，会自动把当前页面提供的搜索引擎增加到你的搜索栏。&lt;/p&gt;&lt;h3&gt;3.手动添加&lt;/h3&gt;&lt;p&gt;自定义才是王道，查看w3school的搜索，是调用Goolge的自定义搜索来实现的，&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;http://www.google.com.hk/search?sitesearch=w3school.com.cn&amp;amp;as_q=html5&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;找到Firefox的搜索引擎目录searchplugins，里边有内置的几个，我们新建一个w3.xml的文件，将下面的代码保存进去&lt;/p&gt;&lt;pre class=&quot;brush: xml; title: Here is the code; notranslate&quot;&gt;
&amp;lt;SearchPlugin xmlns=&amp;quot;http://www.mozilla.org/2006/browser/search/&amp;quot;&amp;gt;
&amp;lt;ShortName&amp;gt;w3school&amp;lt;/ShortName&amp;gt;    //搜索栏显示的名字
&amp;lt;Description&amp;gt;w3school&amp;lt;/Description&amp;gt;  //选中该搜索引擎后，显示的描述名
&amp;lt;InputEncoding&amp;gt;UTF-8&amp;lt;/InputEncoding&amp;gt;   //编码
&amp;lt;Image width=&amp;quot;16&amp;quot; height=&amp;quot;16&amp;quot;&amp;gt;data:image/bmp;base64,Qk04AwAAAAAAAD
YAAAAoAAAAEAAAABAAAAABABgAAAAAAAIDAAASCwAAEgsAAAAAAAAAAAA...&amp;lt;/Image&amp;gt;
&amp;lt;Url type=&amp;quot;text/html&amp;quot; method=&amp;quot;GET&amp;quot; template=&amp;quot;http://www.google.com/search&amp;quot;&amp;gt;
  &amp;lt;Param name=&amp;quot;sitesearch&amp;quot; value=&amp;quot;w3school.com.cn&amp;quot;/&amp;gt;  //参数
  &amp;lt;Param name=&amp;quot;as_q&amp;quot; value=&amp;quot;{searchTerms}&amp;quot;/&amp;gt;
  // {searchTerms}是固定的，这个就是在搜索栏里输入的内容
&amp;lt;/Url&amp;gt;
&amp;lt;SearchForm&amp;gt;http://www.google.com/&amp;lt;/SearchForm&amp;gt;
&amp;lt;/SearchPlugin&amp;gt;
&lt;/pre&gt;&lt;p&gt;Image标签内是一个base64的图像&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.biao166.cn/wp-content/uploads/2011/12/w3school.bmp&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-659&quot; title=&quot;w3school&quot; src=&quot;http://www.biao166.cn/wp-content/uploads/2011/12/w3school.bmp&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #666699;&quot;&gt;&lt;strong&gt;关于搜索栏图标的做法：&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;制作一张 16&amp;#215;16的bmp文件。&lt;/li&gt;&lt;li&gt;打开下面的页面 http://software.hixie.ch/utilities/cgi/data/data&lt;/li&gt;&lt;li&gt;在出现的页面选中”base64&amp;#8243;，在”Alternatively, upload a file:”右边，提交刚才制作好的文件&lt;/li&gt;&lt;li&gt;点击按钮Generate&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;下载：&lt;a href=&quot;http://www.biao166.cn/wp-content/uploads/2011/12/w3.zip&quot;&gt;w3&lt;/a&gt;&lt;/p&gt;&lt;div class='CopyForm'&gt;&lt;p&gt; 　&amp;raquo; 转载请注明来源：&lt;a title=&quot;Biao166's life&quot; href=&quot;http://www.biao166.cn&quot;&gt;Biao166's life&lt;/a&gt; &amp;raquo; &lt;a rel=&quot;bookmark&quot; title=&quot;为FireFox增加自定义搜索引擎-w3school&quot; href=&quot;http://www.biao166.cn/for-firefox-adding-custom-search-engine-w3school.html&quot;&gt;《为FireFox增加自定义搜索引擎-w3school》&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/591037785/biao166/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/biao166/~8021002/591037785/6049814/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://www.biao166.cn/for-firefox-adding-custom-search-engine-w3school.html/feed</wfw:commentRss><slash:comments>0</slash:comments><description>好像已经养成一种习惯了，在firefox上搜索是我不会再打开baidu或者google，而是直接在工具栏上搜索了，w3school是初级菜鸟码农必查的，故萌生把w3school的搜索添加到firefox上。 Firefox添加搜索引擎大概有这么集中方法 1.安装插件 点击搜索栏，左边的下拉按钮，选择“管理搜索引擎”，在出现的页面点击”获取更多搜索引擎“，这个时候会登录到mozilla的add-on的网站上，随便点点就安装上了，里边的搜索引擎不多，不太适合国内用户 2.特别环境安装 火 狐打开可以增加搜索引擎的页面会提示你安装，比如你打开爱词霸的网站 http://www.iciba.com/ ，这个时候点击的搜索栏左边的下拉按钮，会出现” 增加 ”爱词霸辞典“ “，点击这个，会自动把当前页面提供的搜索引擎增加到你的搜索栏。 3.手动添加 自定义才是王道，查看w3school的搜索，是调用Goolge的自定义搜索来实现的， http://www.google.com.hk/search?sitesearch=w3school.com.cn&amp;#38;as_q=html5 找到Firefox的搜索引擎目录searchplugins，里边有内置的几个，我们新建一个w3.xml的文件，将下面的代码保存进去 Image标签内是一个base64的图像 关于搜索栏图标的做法： 制作一张 16&amp;#215;16的bmp文件。 打开下面的页面 http://software.hixie.ch/utilities/cgi/data/data 在出现的页面选中”base64&amp;#8243;，在”Alternatively, upload a file:”右边，提交刚才制作好的文件 点击按钮Generate 下载：w3 　&amp;#187; 转载请注明来源：Biao166's life &amp;#187; 《为FireFox增加自定义搜索引擎-w3school》&lt;img src=&quot;http://www1.feedsky.com/t1/591037785/biao166/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/biao166/~8021002/591037785/6049814/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>web生活</category><pubDate>Wed, 28 Dec 2011 00:00:14 +0800</pubDate><author>biao166</author><comments>http://www.biao166.cn/for-firefox-adding-custom-search-engine-w3school.html#comments</comments><guid isPermaLink="false">http://www.biao166.cn/?p=657</guid><dc:creator>biao166</dc:creator><fs:srclink>http://www.biao166.cn/for-firefox-adding-custom-search-engine-w3school.html</fs:srclink><fs:srcfeed>http://www.biao166.cn/feed</fs:srcfeed><fs:itemid>feedsky/biao166/~8021002/591037785/6049814</fs:itemid></item><item><title>notepad++ 启动和关闭都提示root element is missing</title><link>http://item.feedsky.com/~feedsky/biao166/~8021002/590184318/6049814/1/item.html</link><content:encoded>&lt;p&gt;如题，不晓得什么时候启动和关闭notepad++的时候都弹出提示框：&lt;strong&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;root element is missing&lt;/span&gt;&lt;/strong&gt;，但却不影响正常工作。&lt;/p&gt;&lt;p&gt;网上说是什么根元素丢失，按照提供的方法清空了系统的临时文件夹等等，都没用&amp;#8230;只好自己寻找解决办法：&lt;/p&gt;&lt;p&gt;其他软件没出现错误，应该是notepad++的原因，最有可能是主题or插件or其他配置文件，一步一步排除，最终发现剔除SnippetPlus这个插件后，恢复正常，留个记号&amp;#8230;&lt;/p&gt;&lt;div class='CopyForm'&gt;&lt;p&gt; 　&amp;raquo; 转载请注明来源：&lt;a title=&quot;Biao166's life&quot; href=&quot;http://www.biao166.cn&quot;&gt;Biao166's life&lt;/a&gt; &amp;raquo; &lt;a rel=&quot;bookmark&quot; title=&quot;notepad++ 启动和关闭都提示root element is missing&quot; href=&quot;http://www.biao166.cn/notepad-root-element-is-missing.html&quot;&gt;《notepad++ 启动和关闭都提示root element is missing》&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/590184318/biao166/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/biao166/~8021002/590184318/6049814/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://www.biao166.cn/notepad-root-element-is-missing.html/feed</wfw:commentRss><slash:comments>0</slash:comments><description>如题，不晓得什么时候启动和关闭notepad++的时候都弹出提示框：root element is missing，但却不影响正常工作。 网上说是什么根元素丢失，按照提供的方法清空了系统的临时文件夹等等，都没用&amp;#8230;只好自己寻找解决办法： 其他软件没出现错误，应该是notepad++的原因，最有可能是主题or插件or其他配置文件，一步一步排除，最终发现剔除SnippetPlus这个插件后，恢复正常，留个记号&amp;#8230; 　&amp;#187; 转载请注明来源：Biao166's life &amp;#187; 《notepad++ 启动和关闭都提示root element is missing》&lt;img src=&quot;http://www1.feedsky.com/t1/590184318/biao166/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/biao166/~8021002/590184318/6049814/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>notepad</category><category>web生活</category><pubDate>Sat, 24 Dec 2011 16:20:11 +0800</pubDate><author>biao166</author><comments>http://www.biao166.cn/notepad-root-element-is-missing.html#comments</comments><guid isPermaLink="false">http://www.biao166.cn/?p=655</guid><dc:creator>biao166</dc:creator><fs:srclink>http://www.biao166.cn/notepad-root-element-is-missing.html</fs:srclink><fs:srcfeed>http://www.biao166.cn/feed</fs:srcfeed><fs:itemid>feedsky/biao166/~8021002/590184318/6049814</fs:itemid></item><item><title>清理浮动的几种方法以及对应规范说明-转</title><link>http://item.feedsky.com/~feedsky/biao166/~8021002/590184319/6049814/1/item.html</link><content:encoded>&lt;p&gt;&lt;strong&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;前言&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;浮动 Floats 是 CSS 中的一种布局方式。它的渲染位置在行框与包含块之间，这样就可以使行框内文字与浮动元素不重叠并且环绕它显示。在布局过程中也经常会使用它来达到左右并排布局的效果。但是，由于浮动特性，容器如果没有明确设定高度，会依照普通流内元素高度设置，这样就会导致脱离普通流的浮动元素溢出容器，影响其后元素布局。&lt;/p&gt;&lt;p&gt;我们将现有已知的清楚浮动元素方法罗列下：&lt;/p&gt;&lt;ol&gt;&lt;li&gt;采用一个HTML标签，以及css的clear属性，来手工清理浮动；&lt;/li&gt;&lt;li&gt;采用伪类:after，动态建立一个块元素，设定 clear 属性，清理之前的浮动元素；&lt;/li&gt;&lt;li&gt;采用CSS overflow 非 visible 值(overflow:auto/overflow:hidden)设定使父容器包含浮动元素；&lt;/li&gt;&lt;li&gt;采用display:table/display:table-cell 等table系列属性将父元素变成 table 形式自动包含浮动元素；&lt;/li&gt;&lt;li&gt;使用 TABLE 以及 TD 标签作为浮动元素容器；&lt;/li&gt;&lt;li&gt;采用 float:left/float:right 方式将父元素同样浮动，就可以包含浮动内容；&lt;/li&gt;&lt;li&gt;在 IE 6/7 的标准文档模式中设置 “width/height/zoom” 等样式来自动清理浮动。&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;对这些方式我们一一来对照 CSS 标准（或者浏览器特性）来解释下。&lt;/p&gt;&lt;h2&gt;使用 clear 样式清除&lt;/h2&gt;&lt;p&gt;样例：&lt;/p&gt;&lt;pre class=&quot;brush: css; title: Here is the code; notranslate&quot;&gt;
.clear-float {clear:both;}
&lt;/pre&gt;&lt;p&gt;&lt;span id=&quot;more-653&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;/pre&gt;&lt;p&gt;clear 属性是 CSS 1 就提供的用来清除浮动的样式，设置了 clear 属性的元素，其上边框位置会紧贴浮动元素的 margin-bottom 边界位置渲染，忽略其 margin-top 设置。这样，父容器高度未设定(值是 auto)时，由于定义的清理浮动样式元素所在位置处于浮动元素之下，容器计算后的实际高度就包含了浮动元素。&lt;/p&gt;&lt;h2&gt;使用伪元素 :after 清除&lt;/h2&gt;&lt;p&gt;样例：&lt;/p&gt;&lt;pre class=&quot;brush: css; title: Here is the code; notranslate&quot;&gt;
.after-clear-float :after{content:&amp;quot;&amp;quot;; display:block; clear:both;}
&lt;/pre&gt;&lt;p&gt;:after 伪元素是在 CSS 2 规范内提出的，IE 6/7 并不支持。它的作用是在指定该伪元素元素内，所有子元素最后自动生成一个伪元素，并可以为这个伪元素设定样式。在设定样式中，使用 clear 属性即可达到与手工添加元素指定清理的效果。&lt;/p&gt;&lt;p&gt;注意兼容问题：&lt;br /&gt; :after 伪元素在 IE6/7 中并不被支持，这是由于之前的 IE 版本仅完全实现了 CSS 1 规范标准，以及一部分 CSS 2 规范，恰巧 :after 伪元素不在实现之例。&lt;/p&gt;&lt;h2&gt;使用 overflow 清除&lt;/h2&gt;&lt;p&gt;样例：&lt;/p&gt;&lt;pre class=&quot;brush: css; title: Here is the code; notranslate&quot;&gt;
.overflow-clear-float {overflow:hidden;}
/* 或者 */
.overflow-clear-float {overflow:auto;}
&lt;/pre&gt;&lt;p&gt;overflow 样式值为 非 visilbe 时，实际上是创建了 CSS 2.1 规范定义的 Block Formatting Contexts。创建了它的元素，会重新计算其内部元素位置，从而获得确切高度。这样父容器也就包含了浮动元素高度。这个名词过于晦涩，在 CSS 3 草案中被变更为名词 Root Flow，顾名思义，是创建了一个新的根布局流，这个布局流是独立的，不影响其外部元素的。实际上，这个特性与 早期 IE 的 hasLayout 特性十分相似。&lt;/p&gt;&lt;p&gt;注意兼容问题：&lt;br /&gt; Block Formatting Contexts 概念是在 CSS 2.1 规范内被提出。因此 IE6/7 中并不被支持，这是由于之前的 IE 版本仅完全实现了 CSS 1 规范标准，以及一部分 CSS 2.0 规范。在 IE 7 中，overflow 值为非 visible 时，可以触发 hasLayout 特性。这同样使得 IE 7 同样可以使容器包含浮动元素。&lt;/p&gt;&lt;h2&gt;使用 display:table 清除&lt;/h2&gt;&lt;p&gt;样例：&lt;/p&gt;&lt;pre class=&quot;brush: css; title: Here is the code; notranslate&quot;&gt;
.table-clear-float {display:table}
/* 或者 */
.table-clear-float {display:table-cell}
&lt;/pre&gt;&lt;p&gt;当元素 display 值被设定为 table 或 table-cell 时，同样也创建了 CSS 2.1 规范定义的 Block Formatting Contexts。这样父容器也就包含了浮动元素高度。&lt;/p&gt;&lt;p&gt;注意兼容问题：&lt;br /&gt; 除去 Block Formatting Contexts 在 IE 6/7 中的兼容性外，display:talbe 系列样式设定也不在 IE6/7 的支持范围之内。&lt;/p&gt;&lt;h2&gt;使用表格类元素作为浮动元素容器&lt;/h2&gt;&lt;p&gt;样例：&lt;/p&gt;&lt;pre class=&quot;brush: xml; title: Here is the code; notranslate&quot;&gt;
&amp;lt;table&amp;gt;
&amp;lt;tbody&amp;gt;
&amp;lt;tr&amp;gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&amp;lt;/tbody&amp;gt;
&amp;lt;/table&amp;gt;
&lt;/pre&gt;&lt;p&gt;当使用 TABLE TD TH 等 TABLE 系列标签时， 元素的 display 值实际上说是 display: table 系列，这同样也创建了 CSS 2.1 规范定义的 Block Formatting Contexts。这样父容器也就包含了浮动元素高度。同时在 IE 6/7 中，TABLE TD TH 等 TABLE 系列标签天然拥有 haslayout 特性，这也可以使容器自动包含浮动元素高度。&lt;/p&gt;&lt;h2&gt;使用浮动父元素清除&lt;/h2&gt;&lt;p&gt;当元素设置 float:left/float:right 时 ，同样也创建了 CSS 2.1 规范定义的 Block Formatting Contexts。这样父容器也就包含了浮动元素高度。同时，这个样式也会在 IE 6/7 内触发 hasLayout 特性，拥有这个特性的元素也可以计算出浮动元素的高度，使父元素包含他们。&lt;/p&gt;&lt;p&gt;实际问题：&lt;br /&gt; 虽然这种方式并没有兼容问题，但实际使用中并不推荐。因为很容易推断出，页面中只要有一个浮动元素，使用该方法清理浮动将不可避免的使页面所有元素都浮动才可以达到预期效果。&lt;/p&gt;&lt;h2&gt;触发 hasLayout 清除&lt;/h2&gt;&lt;p&gt;样例：&lt;/p&gt;&lt;pre class=&quot;brush: xml; title: Here is the code; notranslate&quot;&gt;
haslayout-clear-float:{width:1px}
/* 或 */
.haslayout-clear-float:{height:1px}
/* 或 */
.haslayout-clear-float:{zoom:1}
&lt;/pre&gt;&lt;p&gt;&amp;#8216;Layout&amp;#8217; 是 IE 的专有概念，它决定了元素如何对其内容进行定位和尺寸计算，与其他元素的关系和相互作用，以及对应用还有使用者的影响。&lt;/p&gt;&lt;p&gt;&amp;#8216;Layout&amp;#8217; 可以被某些 CSS property（特性）不可逆的触发，而某些 HTML 元素本身就具有 layout 。&lt;/p&gt;&lt;p&gt;&amp;#8216;Layout&amp;#8217; 在 IE 中可以通过 hasLayout 属性来判断一个元素是否拥有 layout ，如 object.currentStyle.hasLayout 。&lt;/p&gt;&lt;p&gt;&amp;#8216;Layout&amp;#8217; 是 IE 浏览器渲染引擎的一个内部组成部分。在 IE 浏览器中，一个元素要么自己对自身的内容进行组织和计算大小， 要么依赖于包含块来计算尺寸和组织内容。为了协调这两种方式的矛盾，渲染引擎采用了 &amp;#8216;hasLayout&amp;#8217; 属性，属性值可以为 true 或 false。 当一个元素的 &amp;#8216;hasLayout&amp;#8217; 属性值为 true 时，我们说这个元素有一个布局（layout），或拥有布局。&lt;/p&gt;&lt;h3&gt;默认拥有布局的元素：&lt;/h3&gt;&lt;pre class=&quot;brush: plain; title: Here is the code; notranslate&quot;&gt;
&amp;lt;html&amp;gt;, &amp;lt;body&amp;gt;
&amp;lt;table&amp;gt;, &amp;lt;tr&amp;gt;, &amp;lt;th&amp;gt;, &amp;lt;td&amp;gt;
&amp;lt;img&amp;gt;
&amp;lt;hr&amp;gt;
&amp;lt;input&amp;gt;, &amp;lt;button&amp;gt;, &amp;lt;select&amp;gt;, &amp;lt;textarea&amp;gt;, &amp;lt;fieldset&amp;gt;, &amp;lt;legend&amp;gt;
&amp;lt;iframe&amp;gt;, &amp;lt;embed&amp;gt;, &amp;lt;object&amp;gt;, &amp;lt;applet&amp;gt;
&amp;lt;marquee&amp;gt;
&lt;/pre&gt;&lt;h3&gt;可触发 hasLayout 的 CSS 特性：&lt;/h3&gt;&lt;pre class=&quot;brush: plain; title: Here is the code; notranslate&quot;&gt;
display: inline-block
height: (除 auto 外任何值)
width: (除 auto 外任何值)
float: (left 或 right)
position: absolute
writing-mode: tb-rl
zoom: (除 normal 外任意值)
&lt;/pre&gt;&lt;h3&gt;IE7 还有一些额外的属性(不完全列表)可以触发 hasLayout ：&lt;/h3&gt;&lt;pre class=&quot;brush: plain; title: Here is the code; notranslate&quot;&gt;
min-height: (任意值)
min-width: (任意值)
max-height: (除 none 外任意值)
max-width: (除 none 外任意值)
overflow: (除 visible 外任意值，仅用于块级元素)
overflow-x: (除 visible 外任意值，仅用于块级元素)
overflow-y: (除 visible 外任意值，仅用于块级元素)
position: fixed
&lt;/pre&gt;&lt;p&gt;IE6 以前的版本（也包括 IE6 及以后所有版本的混杂模式，其实这种混杂模式在渲染方面就相当于 IE 5.5）， 通过设置任何元素的 &amp;#8216;width&amp;#8217; 或 &amp;#8216;height&amp;#8217;（非auto）都可以触发 hasLayout ； 但在 IE6 和 IE7 的标准模式中的行内元素上却不行，设置 &amp;#8216;display:inline-block&amp;#8217; 才可以。&lt;/p&gt;&lt;h3&gt;注意兼容问题：&lt;/h3&gt;&lt;p&gt;haslayout 特性仅 IE 支持，其他浏览器并无此特性。可以依靠计算布局清理浮动的 haslayout 特性仅在 IE 6/7 中存在，IE8 之后将使用 CSS 2.1 的 Block Formatting Contexts 定义来达到同样效果。&lt;/p&gt;&lt;p&gt;注：IE hasLayout 特性厂商说明链接：hasLayout Property&lt;/p&gt;&lt;p&gt;以上内容是常见清理浮动手段生效的规范（和浏览器厂商特性）原理。我们希望页面开发者们，根据他们的兼容性特征以及实际情况来组合使用，以便达到实际项目目标。&lt;br /&gt; 建议&lt;/p&gt;&lt;p&gt;对于初学者我们推荐如下方式之一来清理浮动元素，它们均相对简单可靠：&lt;/p&gt;&lt;p&gt;采用一个HTML标签，以及css的clear属性，来手工清理浮动；&lt;br /&gt; 为元素设置 overflow:hidden 或 overflow:auto 值，配合可以设置 zoom:1 样式触发 IE6 haslayout 特性，来达到兼容所有浏览器清理浮动的目的。&lt;br /&gt; 采用伪元素:after，配合可以设置 zoom:1 样式触发 IE6/7 haslayout 特性，来达到兼容所有浏览器清理浮动的目的。&lt;/p&gt;&lt;div class='CopyForm'&gt;&lt;p&gt; 　&amp;raquo; 转载请注明来源：&lt;a title=&quot;Biao166's life&quot; href=&quot;http://www.biao166.cn&quot;&gt;Biao166's life&lt;/a&gt; &amp;raquo; &lt;a rel=&quot;bookmark&quot; title=&quot;清理浮动的几种方法以及对应规范说明-转&quot; href=&quot;http://www.biao166.cn/clear-all-studio.html&quot;&gt;《清理浮动的几种方法以及对应规范说明-转》&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/590184319/biao166/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/biao166/~8021002/590184319/6049814/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://www.biao166.cn/clear-all-studio.html/feed</wfw:commentRss><slash:comments>0</slash:comments><description>前言 浮动 Floats 是 CSS 中的一种布局方式。它的渲染位置在行框与包含块之间，这样就可以使行框内文字与浮动元素不重叠并且环绕它显示。在布局过程中也经常会使用它来达到左右并排布局的效果。但是，由于浮动特性，容器如果没有明确设定高度，会依照普通流内元素高度设置，这样就会导致脱离普通流的浮动元素溢出容器，影响其后元素布局。 我们将现有已知的清楚浮动元素方法罗列下： 采用一个HTML标签，以及css的clear属性，来手工清理浮动； 采用伪类:after，动态建立一个块元素，设定 clear 属性，清理之前的浮动元素； 采用CSS overflow 非 visible 值(overflow:auto/overflow:hidden)设定使父容器包含浮动元素； 采用display:table/display:table-cell 等table系列属性将父元素变成 table 形式自动包含浮动元素； 使用 TABLE 以及 TD 标签作为浮动元素容器； 采用 float:left/float:right 方式将父元素同样浮动，就可以包含浮动内容； 在 IE 6/7 的标准文档模式中设置 “width/height/zoom” 等样式来自动清理浮动。 对这些方式我们一一来对照 CSS 标准（或者浏览器特性）来解释下。 使用 clear 样式清除 &amp;#8230; &lt;a href=&quot;http://www.biao166.cn/clear-all-studio.html&quot;&gt;继续阅读 &lt;span class=&quot;meta-nav&quot;&gt;&amp;#8594;&lt;/span&gt;&lt;/a&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/590184319/biao166/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/biao166/~8021002/590184319/6049814/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>前端</category><category>清除浮动</category><category>clear</category><pubDate>Tue, 13 Dec 2011 23:13:22 +0800</pubDate><author>biao166</author><comments>http://www.biao166.cn/clear-all-studio.html#comments</comments><guid isPermaLink="false">http://www.biao166.cn/?p=653</guid><dc:creator>biao166</dc:creator><fs:srclink>http://www.biao166.cn/clear-all-studio.html</fs:srclink><fs:srcfeed>http://www.biao166.cn/feed</fs:srcfeed><fs:itemid>feedsky/biao166/~8021002/590184319/6049814</fs:itemid></item><item><title>JS刷新页面的种种</title><link>http://item.feedsky.com/~feedsky/biao166/~8021002/590184320/6049814/1/item.html</link><content:encoded>&lt;h4&gt;&lt;a href=&quot;http://www.w3school.com.cn/htmldom/dom_obj_location.asp&quot; target=&quot;_blank&quot;&gt;Location 对象&lt;/a&gt;：&lt;/h4&gt;&lt;p&gt;包含有关当前 URL 的信息，是 Window 对象的一个部分，可通过 window.location 属性来访问，存储在 Window 对象的 Location 属性中，表示那个窗口中当前显示的文档的 Web 地址。它的 &lt;a href=&quot;http://www.w3school.com.cn/htmldom/prop_loc_href.asp&quot;&gt;href 属性&lt;/a&gt;存放的是文档的完整 URL，其他属性则分别描述了 URL 的各个部分。这些属性与 Anchor 对象（或 Area 对象）的 URL 属性非常相似。当一个 Location 对象被转换成字符串，href 属性的值被返回。这意味着你可以使用表达式 location 来替代 location.href。&lt;/p&gt;&lt;h2&gt;Location 对象方法&lt;/h2&gt;&lt;h3&gt;assign() 方法&lt;/h3&gt;&lt;h4&gt;定义和用法&lt;/h4&gt;&lt;p&gt;assign() 方法可加载一个新的文档。&lt;span id=&quot;more-651&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;h4&gt;语法&lt;/h4&gt;&lt;p&gt;&lt;code&gt;location.assign(URL)&lt;/code&gt;&lt;/p&gt;&lt;h4&gt;实例&lt;/h4&gt;&lt;pre class=&quot;brush: xml; title: Here is the code; notranslate&quot;&gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;
    function newDoc(){
	window.location.assign(&amp;lt;a href=&amp;quot;../&amp;quot;&amp;gt;http://www.biao166.cn&amp;lt;/a&amp;gt;)
    }
&amp;lt;/script&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;input type=&amp;quot;button&amp;quot; value=&amp;quot;Load new document&amp;quot; onclick=&amp;quot;newDoc()&amp;quot; /&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/pre&gt;&lt;h2&gt;reload() 方法&lt;/h2&gt;&lt;h3&gt;定义和用法&lt;/h3&gt;&lt;p&gt;reload() 方法用于重新加载当前文档。&lt;/p&gt;&lt;h4&gt;语法&lt;/h4&gt;&lt;p&gt;&lt;code&gt;location.reload(force)&lt;/code&gt;&lt;/p&gt;&lt;h4&gt;说明&lt;/h4&gt;&lt;p&gt;如果该方法没有规定参数，或者参数是 false，它就会用 HTTP 头 If-Modified-Since 来检测服务器上的文档是否已改变。如果文档已改变，reload() 会再次下载该文档。如果文档未改变，则该方法将从缓存中装载文档。这与用户单击浏览器的刷新按钮的效果是完全一样的。&lt;/p&gt;&lt;p&gt;如果把该方法的参数设置为 true，那么无论文档的最后修改日期是什么，它都会绕过缓存，从服务器上重新下载该文档。这与用户在单击浏览器的刷新按钮时按住 Shift 健的效果是完全一样。&lt;/p&gt;&lt;h4&gt;实例&lt;/h4&gt;&lt;pre class=&quot;brush: xml; title: Here is the code; notranslate&quot;&gt;
    &amp;lt;html&amp;gt;
    &amp;lt;head&amp;gt;
    &amp;lt;script type=”text/javascript”&amp;gt;
        function reloadPage(){window.location.reload()}
    &amp;lt;/script&amp;gt;
    &amp;lt;/head&amp;gt;
    &amp;lt;body&amp;gt;
        &amp;lt;input type=”button” value=”Reload page” onclick=”reloadPage()” /&amp;gt;
    &amp;lt;/body&amp;gt;
    &amp;lt;/html&amp;gt;
&lt;/pre&gt;&lt;h2&gt;replace() 方法&lt;/h2&gt;&lt;h3&gt;定义和用法&lt;/h3&gt;&lt;p&gt;replace() 方法可用一个新文档取代当前文档。&lt;/p&gt;&lt;h3&gt;语法&lt;/h3&gt;&lt;p&gt;&lt;code&gt;location.replace(newURL)&lt;/code&gt;&lt;/p&gt;&lt;h3&gt;说明&lt;/h3&gt;&lt;p&gt;replace() 方法不会在 History 对象中生成一个新的纪录。当使用该方法时，新的 URL 将覆盖 History 对象中的当前纪录。&lt;/p&gt;&lt;h4&gt;实例&lt;/h4&gt;&lt;p&gt;下面的例子将使用 replace() 方法来替换当前文档：&lt;/p&gt;&lt;pre class=&quot;brush: xml; title: Here is the code; notranslate&quot;&gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;script type=”text/javascript”&amp;gt;
    function replaceDoc(){
        window.location.replace(“http://www.w3school.com.cn”)
    }
&amp;lt;/script&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;input type=”button” value=”Replace document” onclick=”replaceDoc()” /&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/pre&gt;&lt;p&gt;附：&lt;br /&gt; Javascript刷新页面的几种方法：&lt;/p&gt;&lt;ul&gt;&lt;li&gt;history.go(0)&lt;/li&gt;&lt;li&gt;location.reload()&lt;/li&gt;&lt;li&gt;location=location&lt;/li&gt;&lt;li&gt;location.assign(location)&lt;/li&gt;&lt;li&gt;document.execCommand(&amp;#8216;Refresh&amp;#8217;)&lt;/li&gt;&lt;li&gt;window.navigate(location)&lt;/li&gt;&lt;li&gt;location.replace(location)&lt;/li&gt;&lt;li&gt;document.URL=location.href&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;自动刷新页面的方法:&lt;br /&gt; 1.页面自动刷新：把如下代码加入&amp;lt;head&amp;gt;区域中&lt;br /&gt; &amp;lt;meta http-equiv=”refresh” content=”20&amp;#8243;&amp;gt;&lt;br /&gt; 其中20指每隔20秒刷新一次页面.&lt;/p&gt;&lt;p&gt;2.页面自动跳转：把如下代码加入&amp;lt;head&amp;gt;区域中&lt;br /&gt; &amp;lt;meta http-equiv=”refresh” content=”20;url=http://www.biao166.cn”&amp;gt;&lt;br /&gt; 其中20指隔20秒后跳转到&lt;a href=&quot;../&quot;&gt;http://www.biao166.cn&lt;/a&gt;页面&lt;/p&gt;&lt;p&gt;3.页面自动刷新js版&lt;br /&gt; &amp;lt;script language=”JavaScript”&amp;gt;&lt;br /&gt; function myrefresh(){&lt;br /&gt; window.location.reload();&lt;br /&gt; }&lt;br /&gt; setTimeout(&amp;#8216;myrefresh()&amp;#8217;,1000); //指定1秒刷新一次&lt;br /&gt; &amp;lt;/script&amp;gt;&lt;/p&gt;&lt;p&gt;JS刷新框架的脚本语句&lt;/p&gt;&lt;p&gt;//如何刷新包含该框架的页面用&lt;br /&gt; &amp;lt;script language=JavaScript&amp;gt;&lt;br /&gt; parent.location.reload();&lt;br /&gt; &amp;lt;/script&amp;gt;&lt;/p&gt;&lt;p&gt;//子窗口刷新父窗口&lt;br /&gt; &amp;lt;script language=JavaScript&amp;gt;&lt;br /&gt; self.opener.location.reload();&lt;br /&gt; &amp;lt;/script&amp;gt;&lt;br /&gt; (　或　&amp;lt;a href=”javascript:opener.location.reload()”&amp;gt;刷新&amp;lt;/a&amp;gt;   )&lt;/p&gt;&lt;p&gt;//如何刷新另一个框架的页面用&lt;br /&gt; &amp;lt;script language=JavaScript&amp;gt;&lt;br /&gt; parent.另一FrameID.location.reload();&lt;br /&gt; &amp;lt;/script&amp;gt;&lt;/p&gt;&lt;p&gt;//如果想关闭窗口时刷新或者想开窗时刷新的话，在&amp;lt;body&amp;gt;中调用以下语句即可。&lt;br /&gt; &amp;lt;body onload=”opener.location.reload()”&amp;gt; 开窗时刷新&lt;br /&gt; &amp;lt;body onUnload=”opener.location.reload()”&amp;gt; 关闭时刷新&lt;br /&gt; &amp;lt;script language=”javascript”&amp;gt;&lt;br /&gt; window.opener.document.location.reload()&lt;br /&gt; &amp;lt;/script&amp;gt;&lt;/p&gt;&lt;div class='CopyForm'&gt;&lt;p&gt; 　&amp;raquo; 转载请注明来源：&lt;a title=&quot;Biao166's life&quot; href=&quot;http://www.biao166.cn&quot;&gt;Biao166's life&lt;/a&gt; &amp;raquo; &lt;a rel=&quot;bookmark&quot; title=&quot;JS刷新页面的种种&quot; href=&quot;http://www.biao166.cn/js-refresh.html&quot;&gt;《JS刷新页面的种种》&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/590184320/biao166/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/biao166/~8021002/590184320/6049814/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://www.biao166.cn/js-refresh.html/feed</wfw:commentRss><slash:comments>2</slash:comments><description>Location 对象： 包含有关当前 URL 的信息，是 Window 对象的一个部分，可通过 window.location 属性来访问，存储在 Window 对象的 Location 属性中，表示那个窗口中当前显示的文档的 Web 地址。它的 href 属性存放的是文档的完整 URL，其他属性则分别描述了 URL 的各个部分。这些属性与 Anchor 对象（或 Area 对象）的 URL 属性非常相似。当一个 Location 对象被转换成字符串，href 属性的值被返回。这意味着你可以使用表达式 location 来替代 location.href。 Location 对象方法 assign() 方法 定义和用法 assign() 方法可加载一个新的文档。 语法 &amp;#8230; &lt;a href=&quot;http://www.biao166.cn/js-refresh.html&quot;&gt;继续阅读 &lt;span class=&quot;meta-nav&quot;&gt;&amp;#8594;&lt;/span&gt;&lt;/a&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/590184320/biao166/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/biao166/~8021002/590184320/6049814/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>js</category><category>前端</category><pubDate>Thu, 01 Dec 2011 00:28:12 +0800</pubDate><author>biao166</author><comments>http://www.biao166.cn/js-refresh.html#comments</comments><guid isPermaLink="false">http://www.biao166.cn/?p=651</guid><dc:creator>biao166</dc:creator><fs:srclink>http://www.biao166.cn/js-refresh.html</fs:srclink><fs:srcfeed>http://www.biao166.cn/feed</fs:srcfeed><fs:itemid>feedsky/biao166/~8021002/590184320/6049814</fs:itemid></item><item><title>IE报错：缺少标识符、字符串或数字</title><link>http://item.feedsky.com/~feedsky/biao166/~8021002/590184321/6049814/1/item.html</link><content:encoded>&lt;p&gt;十点多了接到反馈，论坛IE报错：缺少标识符、字符串或数字，哎，赶紧解决！&lt;/p&gt;&lt;p&gt;开始调试吧，首先还原错误额！&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://www.biao166.cn/wp-content/uploads/2011/11/IE-%E8%84%9A%E6%9C%AC%E8%B0%83%E8%AF%95.png&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-650&quot; title=&quot;IE-脚本调试&quot; src=&quot;http://www.biao166.cn/wp-content/uploads/2011/11/IE-%E8%84%9A%E6%9C%AC%E8%B0%83%E8%AF%95.png&quot; alt=&quot;IE-脚本调试&quot; width=&quot;346&quot; height=&quot;362&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;将两个勾去掉，了解报错的大概位置,貌似这个位置没有过改动，想想自己白天改动了什么东西额，网上找下，原因最大可能是&lt;strong&gt;js数组最后一个元素后面添加了”,”&lt;/strong&gt;。这个，貌似我真的添加了一个数组，关于bshare的自定义设置，看下吧，好家伙，貌似最后一个真的多了一个逗号，在火狐下轻松通过，却在IE给我做小动作。&lt;/p&gt;&lt;div class='CopyForm'&gt;&lt;p&gt; 　&amp;raquo; 转载请注明来源：&lt;a title=&quot;Biao166's life&quot; href=&quot;http://www.biao166.cn&quot;&gt;Biao166's life&lt;/a&gt; &amp;raquo; &lt;a rel=&quot;bookmark&quot; title=&quot;IE报错：缺少标识符、字符串或数字&quot; href=&quot;http://www.biao166.cn/ie-error-lack.html&quot;&gt;《IE报错：缺少标识符、字符串或数字》&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/590184321/biao166/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/biao166/~8021002/590184321/6049814/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://www.biao166.cn/ie-error-lack.html/feed</wfw:commentRss><slash:comments>1</slash:comments><description>十点多了接到反馈，论坛IE报错：缺少标识符、字符串或数字，哎，赶紧解决！ 开始调试吧，首先还原错误额！ 将两个勾去掉，了解报错的大概位置,貌似这个位置没有过改动，想想自己白天改动了什么东西额，网上找下，原因最大可能是js数组最后一个元素后面添加了”,”。这个，貌似我真的添加了一个数组，关于bshare的自定义设置，看下吧，好家伙，貌似最后一个真的多了一个逗号，在火狐下轻松通过，却在IE给我做小动作。 　&amp;#187; 转载请注明来源：Biao166's life &amp;#187; 《IE报错：缺少标识符、字符串或数字》&lt;img src=&quot;http://www1.feedsky.com/t1/590184321/biao166/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/biao166/~8021002/590184321/6049814/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>前端</category><category>Javascript</category><category>IE</category><pubDate>Mon, 21 Nov 2011 21:54:22 +0800</pubDate><author>biao166</author><comments>http://www.biao166.cn/ie-error-lack.html#comments</comments><guid isPermaLink="false">http://www.biao166.cn/?p=649</guid><dc:creator>biao166</dc:creator><fs:srclink>http://www.biao166.cn/ie-error-lack.html</fs:srclink><fs:srcfeed>http://www.biao166.cn/feed</fs:srcfeed><fs:itemid>feedsky/biao166/~8021002/590184321/6049814</fs:itemid></item><item><title>PR暴增到4，希望RP暴增</title><link>http://item.feedsky.com/~feedsky/biao166/~8021002/590184322/6049814/1/item.html</link><content:encoded>&lt;p&gt;&lt;a href=&quot;http://www.biao166.cn/wp-content/uploads/2011/11/20111108biao166.cnpr_.jpg&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-647&quot; title=&quot;20111108biao166.cnpr&quot; src=&quot;http://www.biao166.cn/wp-content/uploads/2011/11/20111108biao166.cnpr_.jpg&quot; alt=&quot;&quot; width=&quot;479&quot; height=&quot;321&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;GOOGLE出问题了？大清早发现PR变4，呼呼，不做评论，只当路过！！！&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div class='CopyForm'&gt;&lt;p&gt; 　&amp;raquo; 转载请注明来源：&lt;a title=&quot;Biao166's life&quot; href=&quot;http://www.biao166.cn&quot;&gt;Biao166's life&lt;/a&gt; &amp;raquo; &lt;a rel=&quot;bookmark&quot; title=&quot;PR暴增到4，希望RP暴增&quot; href=&quot;http://www.biao166.cn/prto4.html&quot;&gt;《PR暴增到4，希望RP暴增》&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/590184322/biao166/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/biao166/~8021002/590184322/6049814/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://www.biao166.cn/prto4.html/feed</wfw:commentRss><slash:comments>0</slash:comments><description>GOOGLE出问题了？大清早发现PR变4，呼呼，不做评论，只当路过！！！ &amp;#160; 　&amp;#187; 转载请注明来源：Biao166's life &amp;#187; 《PR暴增到4，希望RP暴增》&lt;img src=&quot;http://www1.feedsky.com/t1/590184322/biao166/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/biao166/~8021002/590184322/6049814/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>Google</category><category>PR</category><category>web生活</category><pubDate>Tue, 08 Nov 2011 09:16:28 +0800</pubDate><author>biao166</author><comments>http://www.biao166.cn/prto4.html#comments</comments><guid isPermaLink="false">http://www.biao166.cn/?p=646</guid><dc:creator>biao166</dc:creator><fs:srclink>http://www.biao166.cn/prto4.html</fs:srclink><fs:srcfeed>http://www.biao166.cn/feed</fs:srcfeed><fs:itemid>feedsky/biao166/~8021002/590184322/6049814</fs:itemid></item><item><title>Dreamweaver 安装Zen Coding后tab键冲突的解决</title><link>http://item.feedsky.com/~feedsky/biao166/~8021002/590184323/6049814/1/item.html</link><content:encoded>&lt;p&gt;Dreamweaver安装了Zen Coding后默认会设置快捷键为Tab，但平时缩进又离不开Tab，久寻求方法解决而不得，最终还是在国外找到方法。&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;In Dreamweaver CS5 for Windows 7 replace the shortcut “Tab” to “Ctrl+Alt+Shift+Space” in the file Menus.xml&lt;/p&gt;&lt;p&gt;1. Open the C:\Users\YourUserName\AppData\Roaming\Adobe\Dreamweaver CS5\en_US\Configuration\Menus\Menus.xml&lt;/p&gt;&lt;p&gt;2. Search for “Tab” (with quotes)&lt;/p&gt;&lt;p&gt;3. Replace “Tab” to “Ctrl+Alt+Shift+Space ”&lt;/p&gt;&lt;p&gt;4. Save the file&lt;/p&gt;&lt;p&gt;5. Restart Dreamweaver&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;换句话说在XP下面就在： C:\Documents and Settings\&lt;span style=&quot;color: #ff0000;&quot;&gt;**用户名**&lt;/span&gt;\Application Data\Adobe\Dreamweaver CS5.5\zh_CN\Configuration\Menus\&lt;span style=&quot;color: #ff0000;&quot;&gt;Menus.xml&lt;/span&gt;,在里边搜索“&lt;span style=&quot;color: #ff6600; font-weight:700;&quot;&gt;Tab&lt;/span&gt;”，然后用其他冷门的键代替，重启DW，再设置新的快捷键，我的为Ctrl+E，OVER！&lt;/p&gt;&lt;div class='CopyForm'&gt;&lt;p&gt; 　&amp;raquo; 转载请注明来源：&lt;a title=&quot;Biao166's life&quot; href=&quot;http://www.biao166.cn&quot;&gt;Biao166's life&lt;/a&gt; &amp;raquo; &lt;a rel=&quot;bookmark&quot; title=&quot;Dreamweaver 安装Zen Coding后tab键冲突的解决&quot; href=&quot;http://www.biao166.cn/dreamweaver-zen-coding-tab-solution.html&quot;&gt;《Dreamweaver 安装Zen Coding后tab键冲突的解决》&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/590184323/biao166/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/biao166/~8021002/590184323/6049814/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://www.biao166.cn/dreamweaver-zen-coding-tab-solution.html/feed</wfw:commentRss><slash:comments>1</slash:comments><description>Dreamweaver安装了Zen Coding后默认会设置快捷键为Tab，但平时缩进又离不开Tab，久寻求方法解决而不得，最终还是在国外找到方法。 In Dreamweaver CS5 for Windows 7 replace the shortcut “Tab” to “Ctrl+Alt+Shift+Space” in the file Menus.xml 1. Open the C:\Users\YourUserName\AppData\Roaming\Adobe\Dreamweaver CS5\en_US\Configuration\Menus\Menus.xml 2. Search for “Tab” (with quotes) 3. Replace “Tab” to “Ctrl+Alt+Shift+Space ” 4. Save the file 5. &amp;#8230; &lt;a href=&quot;http://www.biao166.cn/dreamweaver-zen-coding-tab-solution.html&quot;&gt;继续阅读 &lt;span class=&quot;meta-nav&quot;&gt;&amp;#8594;&lt;/span&gt;&lt;/a&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/590184323/biao166/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/biao166/~8021002/590184323/6049814/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>dreamweaver</category><category>前端</category><category>zen conding</category><pubDate>Wed, 12 Oct 2011 09:04:17 +0800</pubDate><author>biao166</author><comments>http://www.biao166.cn/dreamweaver-zen-coding-tab-solution.html#comments</comments><guid isPermaLink="false">http://www.biao166.cn/?p=645</guid><dc:creator>biao166</dc:creator><fs:srclink>http://www.biao166.cn/dreamweaver-zen-coding-tab-solution.html</fs:srclink><fs:srcfeed>http://www.biao166.cn/feed</fs:srcfeed><fs:itemid>feedsky/biao166/~8021002/590184323/6049814</fs:itemid></item><item><title>Aptana Studio 3颜色方案（Theme）-Sunset</title><link>http://item.feedsky.com/~feedsky/biao166/~8021002/590184324/6049814/1/item.html</link><content:encoded>&lt;p&gt;用了快半个月的&lt;a title=&quot;Aptana Studio 3初试&quot; href=&quot;http://www.biao166.cn/aptana-studio.html&quot; target=&quot;_blank&quot;&gt;Aptana Studio 3&lt;/a&gt;，废话少说，Aptana Studio 3除了自带的一些theme之外，网络上几乎找不到相关资源，于是花了点时间自己配置了一个，效果看截图&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://www.biao166.cn/wp-content/uploads/2011/09/PHP.png&quot;&gt;&lt;img class=&quot;size-full wp-image-639 aligncenter&quot; title=&quot;PHP&quot; src=&quot;http://www.biao166.cn/wp-content/uploads/2011/09/PHP.png&quot; alt=&quot;PHP&quot; width=&quot;305&quot; height=&quot;249&quot; /&gt;&lt;/a&gt;php&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://www.biao166.cn/wp-content/uploads/2011/09/HTML.png&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-641&quot; title=&quot;HTML&quot; src=&quot;http://www.biao166.cn/wp-content/uploads/2011/09/HTML.png&quot; alt=&quot;&quot; width=&quot;375&quot; height=&quot;185&quot; /&gt;&lt;/a&gt;HTML&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://www.biao166.cn/wp-content/uploads/2011/09/JAVA.png&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-640&quot; title=&quot;JAVA&quot; src=&quot;http://www.biao166.cn/wp-content/uploads/2011/09/JAVA.png&quot; alt=&quot;&quot; width=&quot;408&quot; height=&quot;289&quot; /&gt;&lt;/a&gt;JAVA&lt;/p&gt;&lt;p&gt;下载地址：&lt;a href=&quot;http://www.biao166.cn/wp-content/uploads/2011/09/sunset.zip&quot;&gt;sunset&lt;/a&gt;&lt;/p&gt;&lt;div class='CopyForm'&gt;&lt;p&gt; 　&amp;raquo; 转载请注明来源：&lt;a title=&quot;Biao166's life&quot; href=&quot;http://www.biao166.cn&quot;&gt;Biao166's life&lt;/a&gt; &amp;raquo; &lt;a rel=&quot;bookmark&quot; title=&quot;Aptana Studio 3颜色方案（Theme）-Sunset&quot; href=&quot;http://www.biao166.cn/aptana-studio-3-theme-sunset.html&quot;&gt;《Aptana Studio 3颜色方案（Theme）-Sunset》&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/590184324/biao166/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/biao166/~8021002/590184324/6049814/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://www.biao166.cn/aptana-studio-3-theme-sunset.html/feed</wfw:commentRss><slash:comments>6</slash:comments><description>用了快半个月的Aptana Studio 3，废话少说，Aptana Studio 3除了自带的一些theme之外，网络上几乎找不到相关资源，于是花了点时间自己配置了一个，效果看截图 php HTML JAVA 下载地址：sunset 　&amp;#187; 转载请注明来源：Biao166's life &amp;#187; 《Aptana Studio 3颜色方案（Theme）-Sunset》&lt;img src=&quot;http://www1.feedsky.com/t1/590184324/biao166/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/biao166/~8021002/590184324/6049814/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>Theme</category><category>前端</category><category>Aptana Studio</category><pubDate>Thu, 22 Sep 2011 23:46:48 +0800</pubDate><author>biao166</author><comments>http://www.biao166.cn/aptana-studio-3-theme-sunset.html#comments</comments><guid isPermaLink="false">http://www.biao166.cn/?p=638</guid><dc:creator>biao166</dc:creator><fs:srclink>http://www.biao166.cn/aptana-studio-3-theme-sunset.html</fs:srclink><fs:srcfeed>http://www.biao166.cn/feed</fs:srcfeed><fs:itemid>feedsky/biao166/~8021002/590184324/6049814</fs:itemid></item><item><title>Aptana Studio 3初试</title><link>http://item.feedsky.com/~feedsky/biao166/~8021002/590184325/6049814/1/item.html</link><content:encoded>&lt;p&gt;DW是个好工具，但其对js，php等的不支持一直是个硬伤，最近转投Aptana Studio 3了&amp;#8230;&lt;/p&gt;&lt;p&gt;下面记录下自己遇到的一些问题：&lt;/p&gt;&lt;p&gt;难道是中国用Aptana Studio 3的人太少了，官方连中文版都没有，这让人着实郁闷，况且还对中文支持不是很好，但看在其对javascript，php等的原生支持上就无所谓啦&amp;#8230;.&lt;/p&gt;&lt;p&gt;一、汉化&lt;/p&gt;&lt;p&gt;aptana完美支持eclipse的语言包，所以我们可以用eclipse的语言包来汉化我们的aptana的。&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.biao166.cn/wp-content/uploads/2011/09/%E6%B1%89%E5%8C%96.png&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-636&quot; title=&quot;汉化&quot; src=&quot;http://www.biao166.cn/wp-content/uploads/2011/09/%E6%B1%89%E5%8C%96.png&quot; alt=&quot;&quot; width=&quot;568&quot; height=&quot;95&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;aptana 2的可以使用Galileo版本的eclipse来升级汉化&lt;br /&gt; 只需要在help点击intall-&amp;gt;new software，填入&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://download.eclipse.org/technology/babel/update-site/R0.9.0/galileo&quot;&gt;http://download.eclipse.org/technology/babel/update-site/R0.9.0/galileo&lt;/a&gt;&lt;/p&gt;&lt;p&gt;等待一会儿，选择chinese&lt;span id=&quot;more-634&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;aptana 3也是一样，可以使用Helios版本的eclipse来升级汉化&lt;br /&gt; 地址是： &lt;a href=&quot;http://download.eclipse.org/technology/babel/update-site/R0.9.0/helios&quot;&gt;http://download.eclipse.org/technology/babel/update-site/R0.9.0/helios&lt;/a&gt;&lt;/p&gt;&lt;p&gt;PS:如果上面的地址不能用了，说明eclipse又更新了，你可以在&lt;a title=&quot;Babel Language Pack Zips and Update Site&quot; href=&quot;http://www.eclipse.org/label/downloads.php&quot; target=&quot;_blank&quot;&gt;http://www.eclipse.org/label/downloads.php&lt;/a&gt;看到新的地址。&lt;br /&gt; 其实就是修改一下R0.x.x这个版本号.&lt;/p&gt;&lt;p&gt;二、兼容中文&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://www.biao166.cn/wp-content/uploads/2011/09/%E6%94%AF%E6%8C%81%E4%B8%AD%E6%96%87.png&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-635&quot; title=&quot;支持中文&quot; src=&quot;http://www.biao166.cn/wp-content/uploads/2011/09/%E6%94%AF%E6%8C%81%E4%B8%AD%E6%96%87.png&quot; alt=&quot;&quot; width=&quot;547&quot; height=&quot;434&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;三、jquery&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.biao166.cn/wp-content/uploads/2011/09/jquery1.png&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-637&quot; title=&quot;jquery1&quot; src=&quot;http://www.biao166.cn/wp-content/uploads/2011/09/jquery1.png&quot; alt=&quot;&quot; width=&quot;471&quot; height=&quot;397&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;进入之后选择javascript-jquery，进入安装界面&amp;#8230;&lt;/p&gt;&lt;p&gt;四、zen-coding&lt;/p&gt;&lt;p&gt;zen coding for aptana studio 3&lt;/p&gt;&lt;p&gt;方法：菜单-帮助-安装新软件-添加-输入地址名称，等待加载，选择就可以了.&lt;/p&gt;&lt;p&gt;安装地址：&lt;a href=&quot;http://zen-coding.ru/eclipse/updates/&quot;&gt;http://zen-coding.ru/eclipse/updates/&lt;/a&gt;&lt;/p&gt;&lt;p&gt;更改快捷键：需要要更改”Expand Abbreviation”的快捷键，只需修改Expand Abbreviation.js。&lt;/p&gt;&lt;p&gt;五、  word wrap for aptana studio 3&lt;/p&gt;&lt;p&gt;安装地址：&lt;a href=&quot;http://ahtik.com/eclipse-update/&quot;&gt;http://ahtik.com/eclipse-update/&lt;/a&gt;&lt;/p&gt;&lt;p&gt;六 更多插件&lt;/p&gt;&lt;p&gt;可以访问这里获取hhttps://github.com/aptana&lt;/p&gt;&lt;p&gt;PS：关于aptana studio3的plugin manager，我反正是没找到，所以上面的安装jquery的插件跟网上一些方法不同，没时间深究了，看下我在官网找到的一段文字吧！&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;There are no JavaScript Framework Plugins for Aptana Studio 3 at this time. The JS Framework plugins are for Aptana Studio 2 only ! &lt;img src='http://www.biao166.cn/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /&gt;&lt;/p&gt;&lt;p&gt;You can add a JS Framework e.g. jQuery by simply add/copy the library to your project.&lt;/p&gt;&lt;p&gt;I see that there is just one ruble for jQuery wich add jQuery specific functionality to Aptana Studio 3.&lt;br /&gt; From the main menu:&lt;br /&gt; “Commands-&amp;gt;Bundle Development::Install Bundle” if it is not already installed.&lt;/p&gt;&lt;/blockquote&gt;&lt;div class='CopyForm'&gt;&lt;p&gt; 　&amp;raquo; 转载请注明来源：&lt;a title=&quot;Biao166's life&quot; href=&quot;http://www.biao166.cn&quot;&gt;Biao166's life&lt;/a&gt; &amp;raquo; &lt;a rel=&quot;bookmark&quot; title=&quot;Aptana Studio 3初试&quot; href=&quot;http://www.biao166.cn/aptana-studio.html&quot;&gt;《Aptana Studio 3初试》&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/590184325/biao166/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/biao166/~8021002/590184325/6049814/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://www.biao166.cn/aptana-studio.html/feed</wfw:commentRss><slash:comments>1</slash:comments><description>DW是个好工具，但其对js，php等的不支持一直是个硬伤，最近转投Aptana Studio 3了&amp;#8230; 下面记录下自己遇到的一些问题： 难道是中国用Aptana Studio 3的人太少了，官方连中文版都没有，这让人着实郁闷，况且还对中文支持不是很好，但看在其对javascript，php等的原生支持上就无所谓啦&amp;#8230;. 一、汉化 aptana完美支持eclipse的语言包，所以我们可以用eclipse的语言包来汉化我们的aptana的。 aptana 2的可以使用Galileo版本的eclipse来升级汉化 只需要在help点击intall-&amp;#62;new software，填入 http://download.eclipse.org/technology/babel/update-site/R0.9.0/galileo 等待一会儿，选择chinese aptana 3也是一样，可以使用Helios版本的eclipse来升级汉化 地址是： http://download.eclipse.org/technology/babel/update-site/R0.9.0/helios PS:如果上面的地址不能用了，说明eclipse又更新了，你可以在http://www.eclipse.org/label/downloads.php看到新的地址。 其实就是修改一下R0.x.x这个版本号. 二、兼容中文 三、jquery 进入之后选择javascript-jquery，进入安装界面&amp;#8230; 四、zen-coding zen coding for aptana studio 3 方法：菜单-帮助-安装新软件-添加-输入地址名称，等待加载，选择就可以了. 安装地址：http://zen-coding.ru/eclipse/updates/ 更改快捷键：需要要更改”Expand Abbreviation”的快捷键，只需修改Expand Abbreviation.js。 五、  word wrap for &amp;#8230; &lt;a href=&quot;http://www.biao166.cn/aptana-studio.html&quot;&gt;继续阅读 &lt;span class=&quot;meta-nav&quot;&gt;&amp;#8594;&lt;/span&gt;&lt;/a&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/590184325/biao166/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/biao166/~8021002/590184325/6049814/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>jquery</category><category>软件应用</category><category>aptana</category><pubDate>Sun, 11 Sep 2011 22:37:17 +0800</pubDate><author>biao166</author><comments>http://www.biao166.cn/aptana-studio.html#comments</comments><guid isPermaLink="false">http://www.biao166.cn/?p=634</guid><dc:creator>biao166</dc:creator><fs:srclink>http://www.biao166.cn/aptana-studio.html</fs:srclink><fs:srcfeed>http://www.biao166.cn/feed</fs:srcfeed><fs:itemid>feedsky/biao166/~8021002/590184325/6049814</fs:itemid></item><item><title>A href=？的对比</title><link>http://item.feedsky.com/~feedsky/biao166/~8021002/590184326/6049814/1/item.html</link><content:encoded>&lt;blockquote&gt;&lt;p&gt;&amp;lt;script type=”text/javascript”&amp;gt;&lt;br /&gt; window.onbeforeunload=function()&lt;br /&gt; {&lt;br /&gt; alert(“onbeforeunload event&amp;#8230;”);&lt;br /&gt; //return false;&lt;br /&gt; }&lt;br /&gt; &amp;lt;/script&amp;gt;&lt;br /&gt; &amp;lt;a href=”#” onclick=”return true;”&amp;gt;测试1&amp;lt;/a&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt; &amp;lt;a href=”javascript:void(0)” onclick=”return true;”&amp;gt;测试2&amp;lt;/a&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt; &amp;lt;a href=”javascript:void(0)” onclick=”return false;”&amp;gt;测试3&amp;lt;/a&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt; &amp;lt;a href=”javascript:void(alert(&amp;#8216;test 4&amp;#8230;.&amp;#8217;))” onclick=”return true;”&amp;gt;测试4&amp;lt;/a&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt; &amp;lt;a href=”javascript:void(alert(&amp;#8216;test 5&amp;#8230;.&amp;#8217;))” onclick=”return false;”&amp;gt;测试5&amp;lt;/a&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt; &amp;lt;a href=&amp;#8217;#this&amp;#8217; onclick=&amp;#8217;fun();return false;&amp;#8217;/&amp;gt;测试6&amp;lt;/a&amp;gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;在开发过程中，经常会使用测试1&amp;lt;a href=&amp;#8217;#&amp;#8217; onclick=&amp;#8217;fun();return false;&amp;#8217;/&amp;gt;这种方式来触发javascript事件而不改变当前链接.或者测试2&amp;lt;a href=”javascript:void(0)” onclick=”return true;”&amp;gt;测试2&amp;lt;/a&amp;gt;这种方式来建立死链接。在web标准中是不建议使用测试2的方式的，因为测试2javascript:void(0)伪协议也会有bug存在，会使gif动画停止播放。在测试2的案例中，我们还能看到，点击事件触发的时候（&lt;strong&gt;调用顺序：onclick-&amp;gt;window.onbeforeunload-&amp;gt;href&lt;/strong&gt;），而测试1却没有，这是因为void运算符在执行之前会调用window.onbeforeunload方法对于void运算符（void只做运算，返回结果为undefined）,所以在调用到href时遇到void运算符的时候，可能就会产生一些bug。&lt;span id=&quot;more-633&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;但是使用测试1的方式href=&amp;#8217;#&amp;#8217; onclick中加上return false，也会存在问题，导致点击链接页面返回顶部，这是由于#号默认锚点为#top,点击后重新定位到top锚点位置，当然可以自己再重新定义一个 top锚点，但是这也不能很好解决问题，仍然也存在定位不准。有些朋友喜欢使用###来替换#(#一般为2到6个，大多都取4个)。无论#几个都是会存在这个bug的，原因同上。&lt;/p&gt;&lt;p&gt;点击链接导致页面返回顶部也可以采用span标签替换a标签来解决，但是还可以不改变标签，只需讲#用#this替换即可解决问题,也可以采用其它锚点&lt;/p&gt;&lt;p&gt;&amp;lt;a href=&amp;#8217;#this&amp;#8217; onclick=&amp;#8217;fun();return false;&amp;#8217;/&amp;gt;&lt;/p&gt;&lt;p&gt;另：当window.onbeforeunload中return false的时候将会有意想不到的收获。提示“确实要离开页面吗？确定&amp;#8230;取消&amp;#8230;”&lt;/p&gt;&lt;div class='CopyForm'&gt;&lt;p&gt; 　&amp;raquo; 转载请注明来源：&lt;a title=&quot;Biao166's life&quot; href=&quot;http://www.biao166.cn&quot;&gt;Biao166's life&lt;/a&gt; &amp;raquo; &lt;a rel=&quot;bookmark&quot; title=&quot;A href=？的对比&quot; href=&quot;http://www.biao166.cn/a-href-comparison.html&quot;&gt;《A href=？的对比》&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/590184326/biao166/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/biao166/~8021002/590184326/6049814/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://www.biao166.cn/a-href-comparison.html/feed</wfw:commentRss><slash:comments>0</slash:comments><description>&amp;#60;script type=”text/javascript”&amp;#62; window.onbeforeunload=function() { alert(“onbeforeunload event&amp;#8230;”); //return false; } &amp;#60;/script&amp;#62; &amp;#60;a href=”#” onclick=”return true;”&amp;#62;测试1&amp;#60;/a&amp;#62;&amp;#60;br/&amp;#62; &amp;#60;a href=”javascript:void(0)” onclick=”return true;”&amp;#62;测试2&amp;#60;/a&amp;#62;&amp;#60;br/&amp;#62; &amp;#60;a href=”javascript:void(0)” onclick=”return false;”&amp;#62;测试3&amp;#60;/a&amp;#62;&amp;#60;br/&amp;#62; &amp;#60;a href=”javascript:void(alert(&amp;#8216;test 4&amp;#8230;.&amp;#8217;))” onclick=”return true;”&amp;#62;测试4&amp;#60;/a&amp;#62;&amp;#60;br/&amp;#62; &amp;#60;a href=”javascript:void(alert(&amp;#8216;test 5&amp;#8230;.&amp;#8217;))” onclick=”return false;”&amp;#62;测试5&amp;#60;/a&amp;#62;&amp;#60;br/&amp;#62; &amp;#60;a href=&amp;#8217;#this&amp;#8217; onclick=&amp;#8217;fun();return false;&amp;#8217;/&amp;#62;测试6&amp;#60;/a&amp;#62; 在开发过程中，经常会使用测试1&amp;#60;a href=&amp;#8217;#&amp;#8217; onclick=&amp;#8217;fun();return false;&amp;#8217;/&amp;#62;这种方式来触发javascript事件而不改变当前链接.或者测试2&amp;#60;a href=”javascript:void(0)” onclick=”return true;”&amp;#62;测试2&amp;#60;/a&amp;#62;这种方式来建立死链接。在web标准中是不建议使用测试2的方式的，因为测试2javascript:void(0)伪协议也会有bug存在，会使gif动画停止播放。在测试2的案例中，我们还能看到，点击事件触发的时候（调用顺序：onclick-&amp;#62;window.onbeforeunload-&amp;#62;href），而测试1却没有，这是因为void运算符在执行之前会调用window.onbeforeunload方法对于void运算符（void只做运算，返回结果为undefined）,所以在调用到href时遇到void运算符的时候，可能就会产生一些bug。 但是使用测试1的方式href=&amp;#8217;#&amp;#8217; onclick中加上return false，也会存在问题，导致点击链接页面返回顶部，这是由于#号默认锚点为#top,点击后重新定位到top锚点位置，当然可以自己再重新定义一个 top锚点，但是这也不能很好解决问题，仍然也存在定位不准。有些朋友喜欢使用###来替换#(#一般为2到6个，大多都取4个)。无论#几个都是会存在这个bug的，原因同上。 点击链接导致页面返回顶部也可以采用span标签替换a标签来解决，但是还可以不改变标签，只需讲#用#this替换即可解决问题,也可以采用其它锚点 &amp;#60;a href=&amp;#8217;#this&amp;#8217; onclick=&amp;#8217;fun();return false;&amp;#8217;/&amp;#62; 另：当window.onbeforeunload中return false的时候将会有意想不到的收获。提示“确实要离开页面吗？确定&amp;#8230;取消&amp;#8230;” 　&amp;#187; 转载请注明来源：Biao166's life &amp;#187; 《A href=？的对比》&lt;img src=&quot;http://www1.feedsky.com/t1/590184326/biao166/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/biao166/~8021002/590184326/6049814/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>Javascript</category><pubDate>Sun, 11 Sep 2011 17:24:14 +0800</pubDate><author>biao166</author><comments>http://www.biao166.cn/a-href-comparison.html#comments</comments><guid isPermaLink="false">http://www.biao166.cn/?p=633</guid><dc:creator>biao166</dc:creator><fs:srclink>http://www.biao166.cn/a-href-comparison.html</fs:srclink><fs:srcfeed>http://www.biao166.cn/feed</fs:srcfeed><fs:itemid>feedsky/biao166/~8021002/590184326/6049814</fs:itemid></item></channel></rss>
