<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>评论：IE 下 href 的 BUG</title>
	<atom:link href="http://www.planabc.net/2008/11/06/ie-href-bug/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.planabc.net/2008/11/06/ie-href-bug/</link>
	<description>落草为根—专注前端技术&#38;&#38;关注用户体验</description>
	<lastBuildDate>Mon, 15 Mar 2010 14:10:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>来自：simaopig</title>
		<link>http://www.planabc.net/2008/11/06/ie-href-bug/comment-page-1/#comment-5818</link>
		<dc:creator>simaopig</dc:creator>
		<pubDate>Thu, 31 Dec 2009 09:58:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/?p=130#comment-5818</guid>
		<description>看了你的代码我才知道 @cc_on 条件编译，很好很强大。。。

如果你也用  &#039;\v&#039; !== &#039;\v&#039;这种我就郁闷了。呵。</description>
		<content:encoded><![CDATA[<p>看了你的代码我才知道 @cc_on 条件编译，很好很强大。。。</p>
<p>如果你也用  &#8216;\v&#8217; !== &#8216;\v&#8217;这种我就郁闷了。呵。</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：Supersah</title>
		<link>http://www.planabc.net/2008/11/06/ie-href-bug/comment-page-1/#comment-5509</link>
		<dc:creator>Supersah</dc:creator>
		<pubDate>Wed, 09 Dec 2009 12:50:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/?p=130#comment-5509</guid>
		<description>使用getAttribute的第二个参数虽然可以解决href的问题，但是对于一些事件属性，比如onclick等等还是会有出入。
我在我的网站里提供了一个这种的方式，href通过这种方式来解决，其他的获取事件属性可以通过getAtributeNode来获取，这个就可以兼顾到很多兼容性的问题。
可惜本人的blog现在不能访问。</description>
		<content:encoded><![CDATA[<p>使用getAttribute的第二个参数虽然可以解决href的问题，但是对于一些事件属性，比如onclick等等还是会有出入。<br />
我在我的网站里提供了一个这种的方式，href通过这种方式来解决，其他的获取事件属性可以通过getAtributeNode来获取，这个就可以兼顾到很多兼容性的问题。<br />
可惜本人的blog现在不能访问。</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：动态网页</title>
		<link>http://www.planabc.net/2008/11/06/ie-href-bug/comment-page-1/#comment-3244</link>
		<dc:creator>动态网页</dc:creator>
		<pubDate>Tue, 21 Apr 2009 08:02:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/?p=130#comment-3244</guid>
		<description>不错的博客,我收藏了能学到不少的东西</description>
		<content:encoded><![CDATA[<p>不错的博客,我收藏了能学到不少的东西</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：股吧</title>
		<link>http://www.planabc.net/2008/11/06/ie-href-bug/comment-page-1/#comment-3191</link>
		<dc:creator>股吧</dc:creator>
		<pubDate>Mon, 13 Apr 2009 15:19:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/?p=130#comment-3191</guid>
		<description>dom操作，如果采用w3c标准的方法，兼容性问题很少，innerHTML是被排除在外的，看来有它的道理。</description>
		<content:encoded><![CDATA[<p>dom操作，如果采用w3c标准的方法，兼容性问题很少，innerHTML是被排除在外的，看来有它的道理。</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：rukey67</title>
		<link>http://www.planabc.net/2008/11/06/ie-href-bug/comment-page-1/#comment-2154</link>
		<dc:creator>rukey67</dc:creator>
		<pubDate>Tue, 25 Nov 2008 02:23:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/?p=130#comment-2154</guid>
		<description>发不了代码，看这个demo：http://www.rukey.cn/test/innerHTML_test.html</description>
		<content:encoded><![CDATA[<p>发不了代码，看这个demo：http://www.rukey.cn/test/innerHTML_test.html</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：rukey67</title>
		<link>http://www.planabc.net/2008/11/06/ie-href-bug/comment-page-1/#comment-2151</link>
		<dc:creator>rukey67</dc:creator>
		<pubDate>Mon, 24 Nov 2008 13:26:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/?p=130#comment-2151</guid>
		<description>不怪我刷屏，提交了评论没提示成功还是失败
都删了吧·</description>
		<content:encoded><![CDATA[<p>不怪我刷屏，提交了评论没提示成功还是失败<br />
都删了吧·</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：rukey67</title>
		<link>http://www.planabc.net/2008/11/06/ie-href-bug/comment-page-1/#comment-2148</link>
		<dc:creator>rukey67</dc:creator>
		<pubDate>Mon, 24 Nov 2008 13:09:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/?p=130#comment-2148</guid>
		<description>有些东西说不清道不明，再给个demo你看下：


function test1(){
	var text=escape(document.getElementById(&quot;text&quot;).innerHTML);
	var str=&quot;&quot;;
	document.getElementById(&quot;input1&quot;).innerHTML=str;
}
function test2(){
	var text=document.getElementById(&quot;text&quot;).innerHTML;
	document.getElementById(&quot;input2&quot;).value=text;
}


我是一行文字&#039;我前面有个分号





</description>
		<content:encoded><![CDATA[<p>有些东西说不清道不明，再给个demo你看下：</p>
<p>function test1(){<br />
	var text=escape(document.getElementById(&#8220;text&#8221;).innerHTML);<br />
	var str=&#8221;";<br />
	document.getElementById(&#8220;input1&#8243;).innerHTML=str;<br />
}<br />
function test2(){<br />
	var text=document.getElementById(&#8220;text&#8221;).innerHTML;<br />
	document.getElementById(&#8220;input2&#8243;).value=text;<br />
}</p>
<p>我是一行文字&#39;我前面有个分号</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：u206.com</title>
		<link>http://www.planabc.net/2008/11/06/ie-href-bug/comment-page-1/#comment-2117</link>
		<dc:creator>u206.com</dc:creator>
		<pubDate>Mon, 17 Nov 2008 15:16:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/?p=130#comment-2117</guid>
		<description>还真第一次听说
学习了</description>
		<content:encoded><![CDATA[<p>还真第一次听说<br />
学习了</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：vampire</title>
		<link>http://www.planabc.net/2008/11/06/ie-href-bug/comment-page-1/#comment-2013</link>
		<dc:creator>vampire</dc:creator>
		<pubDate>Thu, 13 Nov 2008 04:45:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/?p=130#comment-2013</guid>
		<description>最近几篇总是先看到英语原文。。。</description>
		<content:encoded><![CDATA[<p>最近几篇总是先看到英语原文。。。</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：怿飞</title>
		<link>http://www.planabc.net/2008/11/06/ie-href-bug/comment-page-1/#comment-1972</link>
		<dc:creator>怿飞</dc:creator>
		<pubDate>Mon, 10 Nov 2008 07:59:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/?p=130#comment-1972</guid>
		<description>@rukey67 第一个的确严格来说不能算BUG，只能算解析的不一致，不过第二个的确是个BUG，呵呵</description>
		<content:encoded><![CDATA[<p>@rukey67 第一个的确严格来说不能算BUG，只能算解析的不一致，不过第二个的确是个BUG，呵呵</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：rukey67</title>
		<link>http://www.planabc.net/2008/11/06/ie-href-bug/comment-page-1/#comment-1971</link>
		<dc:creator>rukey67</dc:creator>
		<pubDate>Mon, 10 Nov 2008 06:32:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/?p=130#comment-1971</guid>
		<description>算不上bug吧，只是ie解析方式的不同
就像用file表单，浏览选择文件后，ie里面能读到完整的文件地址
ff里面读到的只有文件名</description>
		<content:encoded><![CDATA[<p>算不上bug吧，只是ie解析方式的不同<br />
就像用file表单，浏览选择文件后，ie里面能读到完整的文件地址<br />
ff里面读到的只有文件名</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：达达</title>
		<link>http://www.planabc.net/2008/11/06/ie-href-bug/comment-page-1/#comment-1969</link>
		<dc:creator>达达</dc:creator>
		<pubDate>Mon, 10 Nov 2008 02:37:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/?p=130#comment-1969</guid>
		<description>太神奇了~~~</description>
		<content:encoded><![CDATA[<p>太神奇了~~~</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：二十二</title>
		<link>http://www.planabc.net/2008/11/06/ie-href-bug/comment-page-1/#comment-1968</link>
		<dc:creator>二十二</dc:creator>
		<pubDate>Mon, 10 Nov 2008 01:35:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/?p=130#comment-1968</guid>
		<description>顶一个(虽然不是很懂0_o!!)</description>
		<content:encoded><![CDATA[<p>顶一个(虽然不是很懂0_o!!)</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：arthuridea</title>
		<link>http://www.planabc.net/2008/11/06/ie-href-bug/comment-page-1/#comment-1952</link>
		<dc:creator>arthuridea</dc:creator>
		<pubDate>Sat, 08 Nov 2008 06:44:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/?p=130#comment-1952</guid>
		<description>学习学习~~</description>
		<content:encoded><![CDATA[<p>学习学习~~</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：大仙</title>
		<link>http://www.planabc.net/2008/11/06/ie-href-bug/comment-page-1/#comment-1951</link>
		<dc:creator>大仙</dc:creator>
		<pubDate>Sat, 08 Nov 2008 04:31:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/?p=130#comment-1951</guid>
		<description>又一个前端开发的博客，看来这里有很多东西学，下次一定经常来。</description>
		<content:encoded><![CDATA[<p>又一个前端开发的博客，看来这里有很多东西学，下次一定经常来。</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：firebug</title>
		<link>http://www.planabc.net/2008/11/06/ie-href-bug/comment-page-1/#comment-1938</link>
		<dc:creator>firebug</dc:creator>
		<pubDate>Fri, 07 Nov 2008 06:28:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/?p=130#comment-1938</guid>
		<description>这应该和ie内核的渲染引擎有关，比如在ie下另存为html完整页面后，可以看到所有属性的双引号都没有了，文档结构和源文件差别很大，所有标签全部大写，样式表所有的简写如padding，margin的四个属性会全部解析出来，所有属性名称也是大写，而firefox另存之后就没有此问题，和源文件保持是一致的。</description>
		<content:encoded><![CDATA[<p>这应该和ie内核的渲染引擎有关，比如在ie下另存为html完整页面后，可以看到所有属性的双引号都没有了，文档结构和源文件差别很大，所有标签全部大写，样式表所有的简写如padding，margin的四个属性会全部解析出来，所有属性名称也是大写，而firefox另存之后就没有此问题，和源文件保持是一致的。</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：poor</title>
		<link>http://www.planabc.net/2008/11/06/ie-href-bug/comment-page-1/#comment-1933</link>
		<dc:creator>poor</dc:creator>
		<pubDate>Fri, 07 Nov 2008 03:07:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/?p=130#comment-1933</guid>
		<description>纯属瞎顶。</description>
		<content:encoded><![CDATA[<p>纯属瞎顶。</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：Robin</title>
		<link>http://www.planabc.net/2008/11/06/ie-href-bug/comment-page-1/#comment-1932</link>
		<dc:creator>Robin</dc:creator>
		<pubDate>Fri, 07 Nov 2008 03:06:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/?p=130#comment-1932</guid>
		<description>用jquery的飘过~</description>
		<content:encoded><![CDATA[<p>用jquery的飘过~</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：Macji</title>
		<link>http://www.planabc.net/2008/11/06/ie-href-bug/comment-page-1/#comment-1931</link>
		<dc:creator>Macji</dc:creator>
		<pubDate>Fri, 07 Nov 2008 03:05:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/?p=130#comment-1931</guid>
		<description>又一次邪恶的注释。。。。</description>
		<content:encoded><![CDATA[<p>又一次邪恶的注释。。。。</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：xling</title>
		<link>http://www.planabc.net/2008/11/06/ie-href-bug/comment-page-1/#comment-1930</link>
		<dc:creator>xling</dc:creator>
		<pubDate>Fri, 07 Nov 2008 02:59:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/?p=130#comment-1930</guid>
		<description>经你这么一说，我才知道 getAttribute 还有另外一个参数。
vAttrValue = object.getAttribute(sAttrName [, iFlags])

Parameters

sAttrName Required. String that specifies the name of the attribute. 

iFlags Optional. Integer that specifies one or more of the following flags: 
0 Default. Performs a property search that is not case-sensitive, and returns an interpolated value if the property is found. 

1 Performs a case-sensitive property search. To find a match, the uppercase and lowercase letters in sAttrName must exactly match those in the attribute name. If the iFlags parameter for setAttribute is set to true and this option is set to 0 (default), the specified property name might not be found. 

2 Returns the value exactly as it was set in script or in the source document. 
 



我原来用一笨方法得到 一个文件 的完整路径，看来现在得改改了。

        $.getFullPath = function(path) {

            if (!$$.Browser.ie) {

                var a = document.createElement(&quot;A&quot;);

                a.href = path;

                return a.href;

            } else {

                // 不能用 appendChild(a), return a.href; 这样得到的 href 依然是 path

                var div = $$.$c(&quot;DIV&quot;);

                div.innerHTML = &quot;&lt;a href=&#039;&quot; + path + &quot;&#039; / rel=&quot;nofollow&quot;&gt;&quot;;

                //div.innerHTML   &quot;&lt;A&gt;&lt;/A&gt;&quot;

                return div.innerHTML.match(/href=\&quot;(.*)\&quot;/)[1];

            }</description>
		<content:encoded><![CDATA[<p>经你这么一说，我才知道 getAttribute 还有另外一个参数。<br />
vAttrValue = object.getAttribute(sAttrName [, iFlags])</p>
<p>Parameters</p>
<p>sAttrName Required. String that specifies the name of the attribute. </p>
<p>iFlags Optional. Integer that specifies one or more of the following flags:<br />
0 Default. Performs a property search that is not case-sensitive, and returns an interpolated value if the property is found. </p>
<p>1 Performs a case-sensitive property search. To find a match, the uppercase and lowercase letters in sAttrName must exactly match those in the attribute name. If the iFlags parameter for setAttribute is set to true and this option is set to 0 (default), the specified property name might not be found. </p>
<p>2 Returns the value exactly as it was set in script or in the source document. </p>
<p>我原来用一笨方法得到 一个文件 的完整路径，看来现在得改改了。</p>
<p>        $.getFullPath = function(path) {</p>
<p>            if (!$$.Browser.ie) {</p>
<p>                var a = document.createElement(&#8220;A&#8221;);</p>
<p>                a.href = path;</p>
<p>                return a.href;</p>
<p>            } else {</p>
<p>                // 不能用 appendChild(a), return a.href; 这样得到的 href 依然是 path</p>
<p>                var div = $$.$c(&#8220;DIV&#8221;);</p>
<p>                div.innerHTML = &#8220;<a href='" + path + "' / rel="nofollow">&#8220;;</p>
<p>                //div.innerHTML   &#8220;</a><a></a>&#8221;</p>
<p>                return div.innerHTML.match(/href=\&#8221;(.*)\&#8221;/)[1];</p>
<p>            }</p>
]]></content:encoded>
	</item>
</channel>
</rss>
