<?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>pangwa&#039;s Blog &#187; webdev</title>
	<atom:link href="http://blog.pangwa.com/tag/webdev/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.pangwa.com</link>
	<description>Always be pangwa</description>
	<lastBuildDate>Sat, 06 Aug 2011 15:21:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<atom:link rel='hub' href='http://blog.pangwa.com/?pushpress=hub'/>
		<item>
		<title>IE的怨念</title>
		<link>http://blog.pangwa.com/2009/06/09/complain-on-ie/</link>
		<comments>http://blog.pangwa.com/2009/06/09/complain-on-ie/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 13:23:10 +0000</pubDate>
		<dc:creator>pangwa</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://blog.pangwa.com/2009/06/09/complain-on-ie/</guid>
		<description><![CDATA[&#8211; 因为写网页发现很多不兼容的郁闷的地方…… 1. 数组声明 var a = {a: 1, b:2, c:3, } 注意最后一个”,”, 这样写在ie里是会报语法错误的…… 2. 上面的例子, 如果没有初始化列表的最后一个逗号在ie中是可以的, 但是下面的呢? var params = {class : “main”, a : 1}; 在网页里写下这样的代码, 然后拿到ie里运行, 貌似没看出啥问题(我用的IE7), 可是你会发现你的代码为啥总没执行呢? 于是一行一行的删除代码, 最后n长时间过后总算发现是这行代码的问题, 可是为啥呢? 仔细看看, 貌似这里特别的地方就是在初始化列表里的class是一个关键字 &#8212; 是的, 就是它了, 对于有这种关键字的初始化列表是要加上双引号的, var paramrs = {“class” : “main”,&#160; a : 1};, 这个问题很恼人 &#8212; 你支持{a : 1};为啥就不支持{class : [...]]]></description>
			<content:encoded><![CDATA[<p>&#8211; 因为写网页发现很多不兼容的郁闷的地方……</p>
<p>1. 数组声明 </p>
<blockquote><p>var a = {a: 1, b:2, c:3, }</p>
</blockquote>
<p>注意最后一个”,”, 这样写在ie里是会报语法错误的……</p>
<p>2. 上面的例子, 如果没有初始化列表的最后一个逗号在ie中是可以的, 但是下面的呢? </p>
<blockquote><p>var params = {class : “main”, a : 1}; </p>
</blockquote>
<p>在网页里写下这样的代码, 然后拿到ie里运行, 貌似没看出啥问题(我用的IE7), 可是你会发现你的代码为啥总没执行呢? 于是一行一行的删除代码, 最后n长时间过后总算发现是这行代码的问题, 可是为啥呢? 仔细看看, 貌似这里特别的地方就是在初始化列表里的class是一个关键字 &#8212; 是的, 就是它了, 对于有这种关键字的初始化列表是要加上双引号的, var paramrs = {“class” : “main”,&#160; a : 1};, 这个问题很恼人 &#8212; 你支持{a : 1};为啥就不支持{class : 1};总感觉这里的实现像是半个残废. </p>
<p>3. css兼容性的问题, 太多了…… 导致看到好好的东西到了ie下就是不中啊, display:table-cell 在ie8之前的版本里不支持, 我哭.</p>
<p>4. 再另外像inject &lt;tr&gt; 到&lt;table&gt;里不工作, 必须得先把&lt;tr&gt; inject&lt;tbody&gt;里才行, 用的是mootools, 但估计也是IE的问题导致的, 反正是有了怨念, 就把这个也算到它的头上吧.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Bookmark to:</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fblog.pangwa.com%2F2009%2F06%2F09%2Fcomplain-on-ie%2F&amp;title=IE%E7%9A%84%E6%80%A8%E5%BF%B5" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://blog.pangwa.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.pangwa.com%2F2009%2F06%2F09%2Fcomplain-on-ie%2F&amp;title=IE%E7%9A%84%E6%80%A8%E5%BF%B5" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://blog.pangwa.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fblog.pangwa.com%2F2009%2F06%2F09%2Fcomplain-on-ie%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://blog.pangwa.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fblog.pangwa.com%2F2009%2F06%2F09%2Fcomplain-on-ie%2F&amp;title=IE%E7%9A%84%E6%80%A8%E5%BF%B5" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://blog.pangwa.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fblog.pangwa.com%2F2009%2F06%2F09%2Fcomplain-on-ie%2F&amp;title=IE%E7%9A%84%E6%80%A8%E5%BF%B5" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://blog.pangwa.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.pangwa.com%2F2009%2F06%2F09%2Fcomplain-on-ie%2F&amp;title=IE%E7%9A%84%E6%80%A8%E5%BF%B5" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://blog.pangwa.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fblog.pangwa.com%2F2009%2F06%2F09%2Fcomplain-on-ie%2F&amp;t=IE%E7%9A%84%E6%80%A8%E5%BF%B5" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://blog.pangwa.com/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://blog.pangwa.com/2009/06/09/complain-on-ie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ie css selector issue</title>
		<link>http://blog.pangwa.com/2009/05/15/ie-css-selector-issue/</link>
		<comments>http://blog.pangwa.com/2009/05/15/ie-css-selector-issue/#comments</comments>
		<pubDate>Fri, 15 May 2009 15:09:05 +0000</pubDate>
		<dc:creator>pangwa</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://blog.pangwa.com/2009/05/15/ie-css-selector-issue/</guid>
		<description><![CDATA[最近写了一些html, 遇到一个很郁闷的问题, 大致是下面的, 我写了一些链接, 大致如下: &#60;a class=&#34;actionlink&#34; onclick=’myfunction(this);'&#62;mylink&#60;/a&#62; 为它写了一个css, 如下: a.actionlink { &#160;&#160;&#160; display:block; &#160;&#160;&#160; text-decoration: none; &#160;&#160;&#160; color:&#160; #62C2CC; &#160;&#160;&#160; outline: none; &#160;&#160;&#160; } a.actionlink:hover { &#160;&#160;&#160; display:block; &#160;&#160;&#160; color: blue; &#160;&#160;&#160; text-decoration: underline; &#160;&#160;&#160; } a.actionlink:visited { &#160;&#160;&#160; display:block; &#160;&#160;&#160; color:&#160; $62c2cc; &#160;&#160;&#160; } a.actionlink:active { &#160;&#160;&#160; display:block; &#160;&#160;&#160; color:&#160; red; &#160;&#160;&#160; } [...]]]></description>
			<content:encoded><![CDATA[<p>最近写了一些html, 遇到一个很郁闷的问题, 大致是下面的, 我写了一些链接, 大致如下:</p>
<blockquote><pre>&lt;a class=&quot;actionlink&quot; onclick=’myfunction(this);'&gt;mylink&lt;/a&gt;</pre>
</blockquote>
<p>为它写了一个css, 如下:</p>
<blockquote>
<p> a.actionlink {<br />
    <br />&#160;&#160;&#160; display:block; </p>
<p>&#160;&#160;&#160; text-decoration: none;</p>
<p>&#160;&#160;&#160; color:&#160; #62C2CC;</p>
<p>&#160;&#160;&#160; outline: none;</p>
<p>&#160;&#160;&#160; } </p>
<p>a.actionlink:hover {<br />
    <br />&#160;&#160;&#160; display:block; </p>
<p>&#160;&#160;&#160; color: blue;</p>
<p>&#160;&#160;&#160; text-decoration: underline;</p>
<p>&#160;&#160;&#160; } </p>
<p>a.actionlink:visited {<br />
    <br />&#160;&#160;&#160; display:block; </p>
<p>&#160;&#160;&#160; color:&#160; $62c2cc;</p>
<p>&#160;&#160;&#160; } </p>
<p>a.actionlink:active {<br />
    <br />&#160;&#160;&#160; display:block; </p>
<p>&#160;&#160;&#160; color:&#160; red;</p>
<p>&#160;&#160;&#160; }</p>
</blockquote>
<p><font style="background-color: #ffffff">链接在firefox下面显示的完全正常, 可是在ie7/8下却死活无法正常显示在鼠标移上去时的颜色, 网上找了很久, 看到一些相关的ie8的bug, 像css selector的问题, <a href="http://idreamincode.co.uk/ie8-bugs" target="_blank">这里</a>有一个列表, 本来以为其中的一个css子对象选择符的bug是这个有关, 但是我已经把它改成了直接的类, 所以应该不是那个问题. </font></p>
<p>两天郁闷的尝试都没有成功, 今天再看相关的<a href="http://www.w3.org/TR/CSS2/selector.html#link-pseudo-classes" target="_blank">文档</a>, 在看到选择符的时候, 偶然看到这么一句:</p>
<blockquote>
<p>The document language determines which elements are hyperlink source anchors. For example, in HTML4, the link pseudo-classes apply to<font color="#ff0000"> A elements with an &quot;href&quot; attribute</font>. Thus, the following two CSS 2.1 declarations have similar effect:</p>
<pre>a:link { color: red }
:link  { color: red }</pre>
</blockquote>
<pre>这回忽然注意到其中红色的部分, 难道真和这个有关? 于是试着加上href=&quot;#&quot;, 之后, 果然一切都好了!……</pre>
<blockquote>
<pre>&lt;a href=”#” class=&quot;actionlink&quot; onclick=’myfunction(this);'&gt;mylink&lt;/a&gt;</pre>
</blockquote>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Bookmark to:</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fblog.pangwa.com%2F2009%2F05%2F15%2Fie-css-selector-issue%2F&amp;title=ie+css+selector+issue" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://blog.pangwa.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.pangwa.com%2F2009%2F05%2F15%2Fie-css-selector-issue%2F&amp;title=ie+css+selector+issue" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://blog.pangwa.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fblog.pangwa.com%2F2009%2F05%2F15%2Fie-css-selector-issue%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://blog.pangwa.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fblog.pangwa.com%2F2009%2F05%2F15%2Fie-css-selector-issue%2F&amp;title=ie+css+selector+issue" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://blog.pangwa.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fblog.pangwa.com%2F2009%2F05%2F15%2Fie-css-selector-issue%2F&amp;title=ie+css+selector+issue" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://blog.pangwa.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.pangwa.com%2F2009%2F05%2F15%2Fie-css-selector-issue%2F&amp;title=ie+css+selector+issue" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://blog.pangwa.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fblog.pangwa.com%2F2009%2F05%2F15%2Fie-css-selector-issue%2F&amp;t=ie+css+selector+issue" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://blog.pangwa.com/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://blog.pangwa.com/2009/05/15/ie-css-selector-issue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

