<?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>潔靜精微 &#187; ie</title>
	<atom:link href="http://julabs.me/blog/tags/ie/feed/" rel="self" type="application/rss+xml" />
	<link>http://julabs.me/blog</link>
	<description>想努力创造完美的东西，必须具备心灵的纯洁，同时富于宗教精神。</description>
	<lastBuildDate>Wed, 18 Jan 2012 06:34:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>QQ能正常登录但网页却打不开</title>
		<link>http://julabs.me/blog/not-open-web-qq/</link>
		<comments>http://julabs.me/blog/not-open-web-qq/#comments</comments>
		<pubDate>Sat, 11 Dec 2010 04:31:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[软件]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[qq]]></category>

		<guid isPermaLink="false">http://julabs.me/blog/?p=329</guid>
		<description><![CDATA[因为没有正确关闭一个代理软件，无论用哪个浏览器都打不开网页，但是QQ、旺旺、飞信都是可以正常登录的。我先卸载代理软件，然后重启，网页还是访问不了。最后修改了IE的局域网设置，把里面设置成了自动检测设置，页面就可以正常访问了。方法如下： 在IE中选择工具&#62;&#62;Internet选项； 选择连接选项标签，点击局域网设置按钮 在弹出的局域网(LAN)设置中选择自动检测设置]]></description>
			<content:encoded><![CDATA[<p>因为没有正确关闭一个代理软件，无论用哪个浏览器都打不开网页，但是QQ、旺旺、飞信都是可以正常登录的。我先卸载代理软件，然后重启，网页还是访问不了。最后修改了<abbr title="Internet Explorer">IE</abbr>的<strong>局域网设置</strong>，把里面设置成了<strong>自动检测设置</strong>，页面就可以正常访问了。方法如下：</p>
<ul>
<li>在<abbr title="Internet Explorer">IE</abbr>中选择<strong>工具</strong>&gt;&gt;<strong>Internet选项</strong>；</li>
<li>选择<strong>连接</strong>选项标签，点击<strong>局域网设置</strong>按钮</li>
<li>在弹出的<strong>局域网(LAN)设置</strong>中选择<strong>自动检测设置</strong></li>
</ul>
<p class="img"><img src="/blog/img/10/open-web-qq.png" alt="局域网(LAN)设置" width="416" height="492" /></p>
]]></content:encoded>
			<wfw:commentRss>http://julabs.me/blog/not-open-web-qq/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在非IE中实现mouseenter和mouseleave和的功能</title>
		<link>http://julabs.me/blog/not-ie-mouseenter-mouseleave/</link>
		<comments>http://julabs.me/blog/not-ie-mouseenter-mouseleave/#comments</comments>
		<pubDate>Mon, 15 Nov 2010 08:10:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[前端]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[mouse]]></category>

		<guid isPermaLink="false">http://julabs.me/blog/?p=284</guid>
		<description><![CDATA[IE下的mouseenter和mouseleave方法的好处我就不多说了，关于compareDocumentPosition方法的详细解释请参考《跨浏览器的 mouseenter mouseleave 以及 compareDocumentPosition》，在这里我只给出在非IE中实现这两种功能的简易方法。 下面是模拟IE下的mouseenter和mouseleave功能代码，里面也加上了详细的注释。 /** * 只在非IE中使用 * 模拟 IE 中 mouseenter 和 mouseleave 的效果 * @param {Event} e 发生的事件 * @param {Function} fun 触发的行为 */ var hover = function(e,fun){ /** * 因为这个函数只在非IE的浏览器中使用 * 所以可以使用 e.relatedTarget * 来获得与事件的目标节点相关的节点 &#8230; <a href="http://julabs.me/blog/not-ie-mouseenter-mouseleave/">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><abbr title="Internet Explorer">IE</abbr>下的<code>mouseenter</code>和<code>mouseleave</code>方法的好处我就不多说了，关于<code>compareDocumentPosition</code>方法的详细解释请参考<a href="http://www.cnblogs.com/_franky/archive/2010/05/01/1725624.html" target="_blank">《跨浏览器的 mouseenter mouseleave 以及 compareDocumentPosition》</a>，在这里我只给出在非<abbr title="Internet Explorer">IE</abbr>中实现这两种功能的简易方法。</p>
<p>下面是模拟<abbr title="Internet Explorer">IE</abbr>下的<code>mouseenter</code>和<code>mouseleave</code>功能代码，里面也加上了详细的注释。</p>
<pre><code class="javascript">/**
 * 只在非IE中使用
 * 模拟 IE 中 mouseenter 和 mouseleave 的效果
 * @param {Event} e 发生的事件
 * @param {Function} fun 触发的行为
 */
var hover = function(e,fun){
	/**
	 * 因为这个函数只在非IE的浏览器中使用
	 * 所以可以使用 e.relatedTarget
	 * 来获得与事件的目标节点相关的节点
	 */
	var t = e.relatedTarget,

	// 获得触发此事件的节点
	t2 = e.target;

	/**
	 * 如果当前的节点与触发此事件的节点为同一节点
	 * 并且事件的目标节点不是当前节点的子节点
	 * 则触发行为
	 */
	if(this == t2 &amp;&amp; t &amp;&amp; !(this.compareDocumentPosition(t) == 20)){
		fun.call(this);
	}
	t = t2 = null;
}
</code></pre>
<p>上面的代码看似很多，但去除注释后代码就非常少了。继续说这个函数的用法，设有如下的<abbr title="Document Object Model">DOM</abbr>结构：</p>
<p><span id="more-284"></span></p>
<pre><code class="html">&lt;ul id=&quot;my_id&quot;&gt;
&lt;li&gt;1&lt;/li&gt;
&lt;li&gt;2&lt;/li&gt;
&lt;li&gt;3&lt;/li&gt;
&lt;/ul&gt;
</code></pre>
<p>样式<abbr title="Cascading Style Sheets">CSS</abbr>代码如下：</p>
<pre><code class="css">ul{
	width:200px;
	margin:0;
	padding:10px 0;
	background:#2883DE;
	list-style:none;
	line-height:30px;
	text-align:center;
	color:#FFF;
}
li{
	margin:10px;
	padding:0;
	background:#3728DE;
}
</code></pre>
<p>使用函数<code>hover</code>的<abbr title="JavaScript">JS</abbr>代码如下：</p>
<pre><code class="javascript">window.onload = function(){
	var my_id = document.getElementById('my_id');

	var ul_enter = function(){
		alert('鼠标进入UL');
	}

	var ul_leave = function(){
		alert('鼠标离开UL');
	}

	/**
	 * 用 my_id.onmouseenter!==undefined 来判断
	 * 浏览器支不支持 mouseenter 和 mouseleave 的方法
	 * 注意一定要用 “!==”来判断，而不能用“!=”
	 * 在非 IE 中，my_id.onmouseenter 为 undefined
	 * 在 IE 中，my_id.onmouseenter 为 null 或者为一个 function
	 * Opera 也支持 attachEvent 方法
	 * 但是 Opera 没有 mouseenter 和 mouseleave 的功能
	 */
	if(my_id.onmouseenter!==undefined){
		my_id.attachEvent('onmouseenter',ul_enter);

		my_id.attachEvent('onmouseleave',ul_leave);
	}else{
		my_id.addEventListener('mouseover',function(e){
			//ul_enter();
			hover.call(this,e,ul_enter);
		},false);

		my_id.addEventListener('mouseout',function(e){
			//ul_leave();
			hover.call(this,e,ul_leave);
		},false);
	}

};
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://julabs.me/blog/not-ie-mouseenter-mouseleave/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>attachEvent中this指针问题</title>
		<link>http://julabs.me/blog/attachevent-this-solution/</link>
		<comments>http://julabs.me/blog/attachevent-this-solution/#comments</comments>
		<pubDate>Sun, 25 Jul 2010 09:53:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[前端]]></category>
		<category><![CDATA[attachEvent]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[this]]></category>

		<guid isPermaLink="false">http://julabs.me/blog/?p=248</guid>
		<description><![CDATA[在IE中使用attachEvent给一个元素绑定行为时，事件中的this指针会指向window对象，而不是元素本身，但使用addEventListener或者以elem.onclick = someFunc这种形式绑定的行为则不会出现这种问题。解决的问题也很简单，就是通过call或者apply把this指针引向元素自己，jQuery中也是这样做的。 var _ele = document.getElementById('myElement'); try{ _ele.addEventListener('click',clickFunc,false); }catch(e){ try{ _ele.attachEvent('onclick',function(){clickFunc.call(_ele)}); }catch(e){}; } 这样函数clickFunc中的this指针就会指向被绑定行为的元素了。]]></description>
			<content:encoded><![CDATA[<p>在<abbr title="Internet Explorer">IE</abbr>中使用<strong>attachEvent</strong>给一个元素绑定行为时，事件中的<strong>this</strong>指针会指向<strong>window</strong>对象，而不是元素本身，但使用<strong>addEventListener</strong>或者以<strong>elem.onclick = someFunc</strong>这种形式绑定的行为则不会出现这种问题。解决的问题也很简单，就是通过<strong>call</strong>或者<strong>apply</strong>把<strong>this</strong>指针引向元素自己，<a href="http://jquery.com/" target="_blank">jQuery</a>中也是这样做的。</p>
<pre class="javascript"><code>
var _ele = document.getElementById('myElement');
try{
	_ele.addEventListener('click',clickFunc,false);
}catch(e){
	try{
		_ele.attachEvent('onclick',function(){clickFunc.call(_ele)});
	}catch(e){};
}
</code></pre>
<p>这样函数<code>clickFunc</code>中的<strong>this</strong>指针就会指向被绑定行为的元素了。</p>
]]></content:encoded>
			<wfw:commentRss>http://julabs.me/blog/attachevent-this-solution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>3个IE Bug及其修复</title>
		<link>http://julabs.me/blog/3-awful-ie-bugs-and-fixes/</link>
		<comments>http://julabs.me/blog/3-awful-ie-bugs-and-fixes/#comments</comments>
		<pubDate>Fri, 21 May 2010 14:12:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[前端]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[ie]]></category>

		<guid isPermaLink="false">http://julabs.me/blog/?p=203</guid>
		<description><![CDATA[节选自《10个糟糕的IE Bug及其修复》，正如文章名，文章列出了主要是IE 6的Bug以及其解决方法。有不少都是已经很熟悉的了，现在只列出里面的三个放在这里做下记号。 Bicubic图片缩放 在IE中缩放图片会出现一些锯齿，显示效果不如其它浏览器。解决方法可以加入下面一段CSS代码： img { -ms-interpolation-mode: bicubic; } IFrame背景透明 要想在IE中把IFrame的背景设为透明，首先要把IFrame的allowTransparency属性设置为true，如下： &#60;iframe src="content.html" allowTransparency="true"&#62; &#60;/iframe&#62; 还要在CSS代码中加入如下代码： body { background-color:transparent; } 禁用IE默认的垂直滚动条 默认情况下IE始终都会显示垂直滚动条，以前去除默认垂直滚动条的方法就是用JavsScript，现在看到这个方法更方便，只要在CSS代码中加入如下代码即可： html { overflow: auto; }]]></description>
			<content:encoded><![CDATA[<p>节选自<a href="http://www.blueidea.com/tech/web/2010/7589.asp" target="_blank">《10个糟糕的IE Bug及其修复》</a>，正如文章名，文章列出了主要是<abbr title="Internet Explorer 6">IE 6</abbr>的Bug以及其解决方法。有不少都是已经很熟悉的了，现在只列出里面的三个放在这里做下记号。</p>
<h4>Bicubic图片缩放</h4>
<p>在<abbr title="Internet Explorer">IE</abbr>中缩放图片会出现一些锯齿，显示效果不如其它浏览器。解决方法可以加入下面一段<abbr title="Cascading Style Sheets">CSS</abbr>代码：</p>
<pre><code class="css">img { -ms-interpolation-mode: bicubic; }
</code></pre>
<h4>IFrame背景透明</h4>
<p>要想在<abbr title="Internet Explorer">IE</abbr>中把<strong>IFrame</strong>的背景设为透明，首先要把<strong>IFrame</strong>的<strong>allowTransparency</strong>属性设置为<strong>true</strong>，如下：</p>
<pre><code class="html">&lt;iframe src="content.html" allowTransparency="true"&gt;
&lt;/iframe&gt;
</code></pre>
<p>还要在<abbr title="Cascading Style Sheets">CSS</abbr>代码中加入如下代码：</p>
<pre><code class="css">body {
    background-color:transparent;
}
</code></pre>
<h4>禁用IE默认的垂直滚动条</h4>
<p>默认情况下<abbr title="Internet Explorer">IE</abbr>始终都会显示垂直滚动条，以前去除默认垂直滚动条的方法就是用<strong>JavsScript</strong>，现在看到这个方法更方便，只要在<abbr title="Cascading Style Sheets">CSS</abbr>代码中加入如下代码即可：</p>
<pre><code class="css">html {
    overflow: auto;
}
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://julabs.me/blog/3-awful-ie-bugs-and-fixes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>区分IE8的hack</title>
		<link>http://julabs.me/blog/hack-to-target-ie8/</link>
		<comments>http://julabs.me/blog/hack-to-target-ie8/#comments</comments>
		<pubDate>Sat, 03 Apr 2010 06:20:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[前端]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[ie8]]></category>

		<guid isPermaLink="false">http://julabs.me/blog/?p=176</guid>
		<description><![CDATA[制做页面时最好使用IE条件注释判断语句的方法来区分浏览器，但在制做简单的页面时可以用hack的技术来加快制作。 body { color: red; /* 支持所有浏览器 */ color : green\9; /* 支持 IE8 以及以下版本 */ *color : yellow; /* 支持 IE7 以及以下版本 */ _color : orange; /* 支持 IE6 */ } IE9又快出来了，这样一来使用hack的难度又多了一分。]]></description>
			<content:encoded><![CDATA[<p>制做页面时最好使用<a href="/blog/front/ie-if-comment/" target="_blank">IE条件注释判断语句</a>的方法来区分浏览器，但在制做简单的页面时可以用<strong>hack</strong>的技术来加快制作。</p>
<pre><code class="css">
body {
	color: red; /* 支持所有浏览器 */
	color : green\9; /* 支持 IE8 以及以下版本 */
	*color : yellow; /* 支持 IE7 以及以下版本 */
	_color : orange; /* 支持 IE6 */
}
</code></pre>
<p><a href="http://ie.microsoft.com/testdrive/" target="_blank"><acronym title="Internet Explorer 9">IE9</acronym></a>又快出来了，这样一来使用<strong>hack</strong>的难度又多了一分。</p>
]]></content:encoded>
			<wfw:commentRss>http://julabs.me/blog/hack-to-target-ie8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>去掉IE里的脚本控件提示</title>
		<link>http://julabs.me/blog/remove-warn-ie/</link>
		<comments>http://julabs.me/blog/remove-warn-ie/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 09:30:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[前端]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[提示]]></category>

		<guid isPermaLink="false">http://julabs.me/blog/?p=89</guid>
		<description><![CDATA[直接打开本地含有脚本或者ActiveX控件的页面时,IE会弹出一个提示栏,说:&#8221;为了有利于保护安全性，Internet Explorer己限制此网页进行可以访问计算机的脚本或ActiveX控件。请单击这里获取选项&#8230;&#8221;。这虽然是为了安全而设置的一个功能，但在开发测试页面时却给开发者带来了很多麻烦，以前碰到这个问题，我也只能一次一次地在提示栏上点右键，然后选择“允许阻止的内容”，真地是十分的费事。 昨天无意中进入圣叹的站点，发现了《IE中的注释：saved from url》一文，才找到了解决这个问题的方法，方法很简单，就是在页面里加上这么一段注释： &#60;!-- saved from url=(0014)about:internet --&#62; 然后重启IE，再打开本土地的网页文件，令人讨厌的提示栏消失了，世界从此清静了。如果你想了解有关此注释的详细情况，请移步《Mark of the Web》查看。 其实这个注释我们应该不陌生，如果我们用IE保存网上的某一页面时，会自动在保存到本地的网页代码里加入以&#60;!-- saved from url=开头的注释。]]></description>
			<content:encoded><![CDATA[<p>直接打开本地含有脚本或者ActiveX控件的页面时,IE会弹出一个提示栏,说:&#8221;为了有利于保护安全性，Internet Explorer己限制此网页进行可以访问计算机的脚本或ActiveX控件。请单击这里获取选项&#8230;&#8221;。这虽然是为了安全而设置的一个功能，但在开发测试页面时却给开发者带来了很多麻烦，以前碰到这个问题，我也只能一次一次地在提示栏上点右键，然后选择“允许阻止的内容”，真地是十分的费事。</p>
<p>昨天无意中进入<a href="http://www.moorwind.com/" target="_blank">圣叹</a>的站点，发现了<a href="http://www.moorwind.com/read.php?273" target="_blank">《IE中的注释：saved from url》</a>一文，才找到了解决这个问题的方法，方法很简单，就是在页面里加上这么一段注释：</p>
<pre><code class="html">
&lt;!-- saved from url=(0014)about:internet --&gt;
</code>
</pre>
<p>然后重启IE，再打开本土地的网页文件，令人讨厌的提示栏消失了，世界从此清静了。如果你想了解有关此注释的详细情况，请移步<a href="http://msdn.microsoft.com/en-us/library/ms537628(VS.85).aspx" target="_blank">《Mark of the Web》</a>查看。</p>
<p>其实这个注释我们应该不陌生，如果我们用IE保存网上的某一页面时，会自动在保存到本地的网页代码里加入以<code>&lt;!-- saved from url=</code>开头的注释。</p>
]]></content:encoded>
			<wfw:commentRss>http://julabs.me/blog/remove-warn-ie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IE条件注释判断语句</title>
		<link>http://julabs.me/blog/ie-if-comment/</link>
		<comments>http://julabs.me/blog/ie-if-comment/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 09:26:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[前端]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[if]]></category>
		<category><![CDATA[判断]]></category>
		<category><![CDATA[条件]]></category>

		<guid isPermaLink="false">http://julabs.me/blog/?p=85</guid>
		<description><![CDATA[IE条件注释判断语句是IE的一个专有技术，它可以让你根据一定的条件，如是否是IE或者是IE的某一版本来显示相应的代码。需要注意的是，IE条件注释判断语句只能在版本号大于等于5的IE中使用，其它浏览器会将IE条件注释判断语句当成一般的注释给忽略掉。它的使用方法可以看下面的例子。 只要是IE就可以显示 下面这段代码只有在IE浏览器才会显示。 &#60;!--[if IE]&#62; 只要是IE就能显示我。 &#60;![endif]--&#62; 只有IE的特定版本才能显示 在判断语句中的IE后面加上一个版本号，就能指定一个IE版本号显示。下面这段代码只有在IE 7才会显示。 &#60;!--[if IE 7]&#62; 只有在IE7中才显示我。 &#60;![endif]--&#62; 在非特定版本的IE中才能显示 在判断语句中的IE前面加上一个感叹号，就表示只要不是这个版本号的IE就能显示。下面这段代码只有在版本号不是7的IE中才会显示。 &#60;!--[if !IE 7]&#62; 只有在版本号不为7的IE中才显示我。 &#60;![endif]--&#62; 只有高于特定版本的IE才能显示 在判断语句中的if后面加一个gt，就表示只有高于特定的版本号的IE才能显示。下面这段代码只有在版本号高于7的IE中才会显示。由于是“高于”，所以在IE7中也不显示。 &#60;!--[if gt IE 7]&#62; 只有在版本号高于7的IE中才显示我。 &#60;![endif]--&#62; 只有大于或等于特定版本号的IE才能显示 在判断语句中的if后面加一个gte，就表示只有大于或等于特定版本号的IE才能显示。下面这段代码只有在版本号大于或等于7的IE中才会显示。由于是“大于或等于”，所以在IE7中也能够显示。 &#60;!--[if gte IE 7]&#62; 只有在版本号大于或等于7的IE中才显示我，IE7也可以显示。 &#60;![endif]--&#62; 小于或等于特定版本号、小于特定版本号的就不一一举例了，下面总结一下判断语句所用到的关键字： lt &#8230; <a href="http://julabs.me/blog/ie-if-comment/">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>IE条件注释判断语句</strong>是<acronym title="Internet Explorer">IE</acronym>的一个专有技术，它可以让你根据一定的条件，如是否是<acronym title="Internet Explorer">IE</acronym>或者是<acronym title="Internet Explorer">IE</acronym>的某一版本来显示相应的代码。需要注意的是，IE条件注释判断语句只能在版本号大于等于5的IE中使用，其它浏览器会将IE条件注释判断语句当成一般的注释给忽略掉。它的使用方法可以看下面的例子。</p>
<h4>只要是IE就可以显示</h4>
<p>下面这段代码只有在IE浏览器才会显示。</p>
<pre><code class="html">&lt;!--[if IE]&gt;

只要是IE就能显示我。

&lt;![endif]--&gt;
</code></pre>
<h4>只有IE的特定版本才能显示</h4>
<p>在判断语句中的<code>IE</code>后面加上一个版本号，就能指定一个IE版本号显示。下面这段代码只有在IE 7才会显示。</p>
<pre><code class="html">&lt;!--[if IE 7]&gt;

只有在IE7中才显示我。

&lt;![endif]--&gt;
</code></pre>
<h4>在非特定版本的IE中才能显示</h4>
<p>在判断语句中的<code>IE</code>前面加上一个感叹号，就表示只要不是这个版本号的IE就能显示。下面这段代码只有在版本号不是7的IE中才会显示。</p>
<pre><code class="html">&lt;!--[if !IE 7]&gt;

只有在版本号不为7的IE中才显示我。

&lt;![endif]--&gt;
</code></pre>
<p><span id="more-85"></span></p>
<h4>只有高于特定版本的IE才能显示</h4>
<p>在判断语句中的<code>if</code>后面加一个<code>gt</code>，就表示只有高于特定的版本号的IE才能显示。下面这段代码只有在版本号高于7的IE中才会显示。由于是“<strong>高于</strong>”，所以在IE7中也不显示。</p>
<pre><code class="html">&lt;!--[if gt IE 7]&gt;

只有在版本号高于7的IE中才显示我。

&lt;![endif]--&gt;
</code></pre>
<h4>只有大于或等于特定版本号的IE才能显示</h4>
<p>在判断语句中的<code>if</code>后面加一个<code>gte</code>，就表示只有大于或等于特定版本号的IE才能显示。下面这段代码只有在版本号大于或等于7的IE中才会显示。由于是“<strong>大于或等于</strong>”，所以在IE7中也能够显示。</p>
<pre><code class="html">&lt;!--[if gte IE 7]&gt;

只有在版本号大于或等于7的IE中才显示我，IE7也可以显示。

&lt;![endif]--&gt;
</code></pre>
<p>小于或等于特定版本号、小于特定版本号的就不一一举例了，下面总结一下判断语句所用到的关键字：</p>
<ul>
<li>lt ：Less than的简写，小于的意思。</li>
<li>lte ：Less than or equal to的简写，小于或等于的意思。</li>
<li>gt ：Greater than的简写，大于的意思。</li>
<li>gte：Greater than or equal to的简写，大于或等于的意思。</li>
<li>!：不等于的意思。</li>
</ul>
<p>另外一个需要注意的是IE条件注释判断语句只有IE能识别，所以如果想要用IE条件注释判断语句来判断非IE的浏览器不能直接用下面语句：</p>
<pre><code class="html">&lt;!--[if !IE]&gt;

这个判断语句是错误的，这句话在所有的浏览器中都不显示。

&lt;![endif]--&gt;
</code></pre>
<p>如果要判断非IE的浏览器，要用到一个特殊的语句，如下：</p>
<pre><code class="html">&lt;!--[if !IE]&gt;&lt;!--&gt;

只要不是IE的浏览器就能显示我！

&lt;!--&lt;![endif]--&gt;
</code></pre>
<p>上面这段判断语句中所包含的文字我试验了下，在IE中显示不了，其它浏览器，如<a href="http://www.mozillaonline.com/" target="_blank">火狐</a>、<a href="http://www.Opera.com/" target="_blank">Opera</a>、<a href="http://www.google.com/chrome/" target="_blank">chrome</a>中都能显示。</p>
]]></content:encoded>
			<wfw:commentRss>http://julabs.me/blog/ie-if-comment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IE下的Firebug——IE WebDeveloper</title>
		<link>http://julabs.me/blog/ie-plugin-webdeveloper/</link>
		<comments>http://julabs.me/blog/ie-plugin-webdeveloper/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 07:45:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[前端]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[tool]]></category>

		<guid isPermaLink="false">http://julabs.me/blog/?p=17</guid>
		<description><![CDATA[不久之前，在IE下的调试工具我只知道IE Developer Toolbar和Companion.JS，我想这两个工具在IE环境下的功能已经很强大了。但后来在豆瓣的javascript小组中看到了这篇话题——《IE下javascript debug 工具》，其中有个组员推荐了一款IE下功能超强的调试器：IE WebDeveloper，它的功能可以和火狐下的Firebug相媲美，甚至有些功能还强于Firebug。 安装了IE WebDeveloper后会在IE头部的工具栏中出现一个图标，如下图： 点开后就能使用IE WebDeveloper了。IE WebDeveloper有五个主窗口，首先是Webpage Inspector。Webpage Inspector左边是DOM查看器，选择一个DOM节点会在右侧对应地显示其属性值、HTML代码和CSS样式列表。在Webpage Inspector中可以动态地修改DOM结点，IE窗口会实时渲染展示出修改后的结果。（Firebug也有此功能） 第二个为Script Console，这个窗口可以输出页面的一些信息，如错误信息，还能寻址到出错代码的位置。可以在Javascript代码中用console.log('信息')来输出信息了，比alert命令好用多了。还可以直接在里面输入命令进行调试。（Firebug也有此功能） 第三个为Source Explorer，查看当前页所用到CSS和Javascript文件以及HTML源代码，它能够列出Javascript文件中的函数和变量名称。 第四个为Event Log，它能够查看网页浏览器、HTML文档、HTML窗口或所选HTML元素结点的事件触发列表。 最后一个为HTTP Monitor，它可以查看和网络服务器相交互的HTTP信息，相当于Firebug的网络（net）功能，对于AJAX开发很有帮助。 在最后还有人推荐了一个Javascript Debug Toolkit，不过需要eclipse支持，是位国人开发的，感兴趣的朋友可以看看。]]></description>
			<content:encoded><![CDATA[<p>不久之前，在IE下的调试工具我只知道<a href="http://www.microsoft.com/downloadS/details.aspx?familyid=E59C3964-672D-4511-BB3E-2D5E1DB91038&amp;displaylang=en" title="Internet Explorer Developer Toolbar" target="_blank">IE Developer Toolbar</a>和<a href="http://www.my-debugbar.com/wiki/CompanionJS/HomePage" title="Companion.JS" target="_blank">Companion.JS</a>，我想这两个工具在IE环境下的功能已经很强大了。但后来在<a href="http://www.douban.com/" target="_blank">豆瓣</a>的<a href="http://www.douban.com/group/second.life/" target="_blank">javascript小组</a>中看到了这篇话题——<a href="http://www.douban.com/group/topic/2090597/" target="_blank">《IE下javascript debug 工具》</a>，其中有个组员推荐了一款IE下功能超强的调试器：<a href="http://www.ieinspector.com/dominspector/" title="IE WebDeveloper" target="_blank">IE WebDeveloper</a>，它的功能可以和火狐下的<a href="http://getfirebug.com/" title="Firebug" target="_blank">Firebug</a>相媲美，甚至有些功能还强于<a href="http://getfirebug.com/" title="Firebug" target="_blank">Firebug</a>。</p>
<p>安装了<a href="http://www.ieinspector.com/dominspector/" title="IE WebDeveloper" target="_blank">IE WebDeveloper</a>后会在IE头部的工具栏中出现一个图标，如下图：</p>
<p class="img"><img src="http://www.julabs.com/blog/img/09/ie_webdeveloper.png" width="32" height="30" alt="IE WebDeveloper 图标" /></p>
<p>点开后就能使用<a href="http://www.ieinspector.com/dominspector/" title="IE WebDeveloper" target="_blank">IE WebDeveloper</a>了。<a href="http://www.ieinspector.com/dominspector/" title="IE WebDeveloper" target="_blank">IE WebDeveloper</a>有五个主窗口，首先是<strong>Webpage Inspector</strong>。<strong>Webpage Inspector</strong>左边是DOM查看器，选择一个DOM节点会在右侧对应地显示其属性值、HTML代码和CSS样式列表。在<strong>Webpage Inspector</strong>中可以动态地修改DOM结点，IE窗口会实时渲染展示出修改后的结果。（<a href="http://getfirebug.com/" title="Firebug" target="_blank">Firebug</a>也有此功能）</p>
<p><span id="more-17"></span></p>
<p class="img"><a href="http://www.ieinspector.com/dominspector/images/webpage_inspector_l.gif" target="_blank"><img src="http://www.ieinspector.com/dominspector/images/webpage_inspector_l.gif" width="786" height="594" alt="Webpage Inspector" /></a></p>
<p>第二个为<strong>Script Console</strong>，这个窗口可以输出页面的一些信息，如错误信息，还能寻址到出错代码的位置。可以在Javascript代码中用<code>console.log('信息')</code>来输出信息了，比<code>alert</code>命令好用多了。还可以直接在里面输入命令进行调试。（<a href="http://getfirebug.com/" title="Firebug" target="_blank">Firebug</a>也有此功能）</p>
<p class="img"><a href="http://www.ieinspector.com/dominspector/images/scriptconsole_l.gif" target="_blank"><img src="http://www.ieinspector.com/dominspector/images/scriptconsole_l.gif" width="727" height="562" alt="Script Console" /></a></p>
<p>第三个为<strong>Source Explorer</strong>，查看当前页所用到CSS和Javascript文件以及HTML源代码，它能够列出Javascript文件中的函数和变量名称。</p>
<p class="img"><a href="http://www.ieinspector.com/dominspector/images/sourceexplorer_l.gif" target="_blank"><img src="http://www.ieinspector.com/dominspector/images/sourceexplorer_l.gif" width="768" height="594" alt="Source Explorer" /></a></p>
<p>第四个为<strong>Event Log</strong>，它能够查看网页浏览器、HTML文档、HTML窗口或所选HTML元素结点的事件触发列表。</p>
<p class="img"><a href="http://www.ieinspector.com/dominspector/images/event_log_l.gif" target="_blank"><img src="http://www.ieinspector.com/dominspector/images/event_log_l.gif" width="786" height="594" alt="Event Log" /></a></p>
<p>最后一个为<strong>HTTP Monitor</strong>，它可以查看和网络服务器相交互的HTTP信息，相当于<a href="http://getfirebug.com/" title="Firebug" target="_blank">Firebug</a>的<a href="http://getfirebug.com/net.html" title="网络（net）" target="_blank">网络（net）</a>功能，对于AJAX开发很有帮助。</p>
<p class="img"><a href="http://www.ieinspector.com/dominspector/images/http_monitor_l.gif" target="_blank"><img src="http://www.ieinspector.com/dominspector/images/http_monitor_l.gif" width="803" height="588" alt="HTTP Monitor" /></a></p>
<p>在最后还有人推荐了一个<a href="http://code.google.com/p/jsdt/" target="_blank">Javascript Debug Toolkit</a>，不过需要<a href="http://www.eclipse.org/" target="_blank">eclipse</a>支持，是位国人开发的，感兴趣的朋友可以看看。</p>
]]></content:encoded>
			<wfw:commentRss>http://julabs.me/blog/ie-plugin-webdeveloper/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

