<?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>《JavaScript switch case 语句设置范围》的评论</title>
	<atom:link href="http://shawphy.com/2008/07/javascript-switch-case-setting-range.html/feed" rel="self" type="application/rss+xml" />
	<link>http://shawphy.com/2008/07/javascript-switch-case-setting-range.html</link>
	<description>关注HTML,CSS,JavaScript,jQuery等前端开发</description>
	<lastBuildDate>Mon, 07 May 2012 10:20:22 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>作者：runchicken</title>
		<link>http://shawphy.com/2008/07/javascript-switch-case-setting-range.html/comment-page-1#comment-4763</link>
		<dc:creator>runchicken</dc:creator>
		<pubDate>Tue, 07 Feb 2012 05:15:46 +0000</pubDate>
		<guid isPermaLink="false">http://shawphy.com/?p=65#comment-4763</guid>
		<description>这种用法很ok  
在js高级程序设计里面也有提到过；</description>
		<content:encoded><![CDATA[<p>这种用法很ok<br />
在js高级程序设计里面也有提到过；</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：Shawphy</title>
		<link>http://shawphy.com/2008/07/javascript-switch-case-setting-range.html/comment-page-1#comment-128</link>
		<dc:creator>Shawphy</dc:creator>
		<pubDate>Thu, 02 Oct 2008 06:39:05 +0000</pubDate>
		<guid isPermaLink="false">http://shawphy.com/?p=65#comment-128</guid>
		<description>举个例子吧

switch (true) {
    case 80&lt;=s:
        alert(&quot;课上表扬&quot;);
    case 60&lt;=s&amp;&amp;s&lt;80:
        alert(&quot;登记成绩为及格&quot;);
        break;
    case s&lt;40:
        alert(&quot;通知家长&quot;);
    case s&lt;60:
        alert(&quot;登记成绩为不及格&quot;);
        break;
}

尝试一下用if else来写
是不是会比较冗长其可读性欠佳呢？</description>
		<content:encoded><![CDATA[<p>举个例子吧</p>
<p>switch (true) {<br />
    case 80<=s:<br />
        alert(“课上表扬”);<br />
    case 60<=s&#038;&#038;s&lt;80:<br />
        alert(“登记成绩为及格”);<br />
        break;<br />
    case s&lt;40:<br />
        alert(“通知家长”);<br />
    case s&lt;60:<br />
        alert(“登记成绩为不及格”);<br />
        break;<br />
}</p>
<p>尝试一下用if else来写<br />
是不是会比较冗长其可读性欠佳呢？</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：xdsnet</title>
		<link>http://shawphy.com/2008/07/javascript-switch-case-setting-range.html/comment-page-1#comment-123</link>
		<dc:creator>xdsnet</dc:creator>
		<pubDate>Mon, 22 Sep 2008 07:16:10 +0000</pubDate>
		<guid isPermaLink="false">http://shawphy.com/?p=65#comment-123</guid>
		<description>不过这样是否符合规范呢？
有时候不要做太多突破规范的工作，否则规范改动后会出现大量不兼容问题！
我不知道是否是switch...case 
会比用 if...else if...else
效率更高？
如果不是显著高效的话，可能这样做意义就更小啦。</description>
		<content:encoded><![CDATA[<p>不过这样是否符合规范呢？<br />
有时候不要做太多突破规范的工作，否则规范改动后会出现大量不兼容问题！<br />
我不知道是否是switch&#8230;case<br />
会比用 if&#8230;else if&#8230;else<br />
效率更高？<br />
如果不是显著高效的话，可能这样做意义就更小啦。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：Noker</title>
		<link>http://shawphy.com/2008/07/javascript-switch-case-setting-range.html/comment-page-1#comment-119</link>
		<dc:creator>Noker</dc:creator>
		<pubDate>Mon, 01 Sep 2008 12:19:03 +0000</pubDate>
		<guid isPermaLink="false">http://shawphy.com/?p=65#comment-119</guid>
		<description>有机会试试:)</description>
		<content:encoded><![CDATA[<p>有机会试试:)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

