<?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>Comments on: JavaScript中的日期(Date)</title>
	<atom:link href="http://www.prglab.com/blog/js-tutorial/js-date/feed" rel="self" type="application/rss+xml" />
	<link>http://www.prglab.com/blog</link>
	<description>多读书，读好书</description>
	<lastBuildDate>Sat, 24 Dec 2011 06:41:33 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
	<item>
		<title>By: kaka</title>
		<link>http://www.prglab.com/blog/js-tutorial/js-date/comment-page-1#comment-2790</link>
		<dc:creator>kaka</dc:creator>
		<pubDate>Tue, 30 Nov 2010 06:27:05 +0000</pubDate>
		<guid isPermaLink="false">http://prglab.com/blog/?page_id=27#comment-2790</guid>
		<description>

time


function clockView() 

{

thistime= new Date(); //获取时间

//分别获取当前时间的小时、分和秒。

var hours=thistime.getHours();

var minutes=thistime.getMinutes();

var seconds=thistime.getSeconds();

//设置时间的显示格式

if (eval(hours) &lt;10) {hours=&quot;0&quot;+hours;}

if (eval(minutes) &lt; 10) {minutes=&quot;0&quot;+minutes;}

if (seconds &lt; 10) {seconds=&quot;0&quot;+seconds;}

//得到最终应该显示的时间

thistime = hours+&quot;:&quot;+minutes+&quot;:&quot;+seconds;

//根据浏览器的不同设置

if(document.all) {

bgclocknoshade.innerHTML=thistime;

bgclockshade.innerHTML=thistime;

}

if(document.layers) {

document.bgclockshade.document.write(&#039;&#039;+thistime+&#039;&#039;);

document.bgclocknoshade.document.write(&#039;&#039;+thistime+&#039;&#039;);

document.close();

}

var timer=setTimeout(&quot;clockView()&quot;,1000);

}



















</description>
		<content:encoded><![CDATA[<p>time</p>
<p>function clockView() </p>
<p>{</p>
<p>thistime= new Date(); //获取时间</p>
<p>//分别获取当前时间的小时、分和秒。</p>
<p>var hours=thistime.getHours();</p>
<p>var minutes=thistime.getMinutes();</p>
<p>var seconds=thistime.getSeconds();</p>
<p>//设置时间的显示格式</p>
<p>if (eval(hours) &lt;10) {hours=&quot;0&quot;+hours;}</p>
<p>if (eval(minutes) &lt; 10) {minutes=&quot;0&quot;+minutes;}</p>
<p>if (seconds &lt; 10) {seconds=&quot;0&quot;+seconds;}</p>
<p>//得到最终应该显示的时间</p>
<p>thistime = hours+&quot;:&quot;+minutes+&quot;:&quot;+seconds;</p>
<p>//根据浏览器的不同设置</p>
<p>if(document.all) {</p>
<p>bgclocknoshade.innerHTML=thistime;</p>
<p>bgclockshade.innerHTML=thistime;</p>
<p>}</p>
<p>if(document.layers) {</p>
<p>document.bgclockshade.document.write(&#039;&#8217;+thistime+&#8221;);</p>
<p>document.bgclocknoshade.document.write(&#8221;+thistime+&#8221;);</p>
<p>document.close();</p>
<p>}</p>
<p>var timer=setTimeout(&#8220;clockView()&#8221;,1000);</p>
<p>}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 书生</title>
		<link>http://www.prglab.com/blog/js-tutorial/js-date/comment-page-1#comment-2640</link>
		<dc:creator>书生</dc:creator>
		<pubDate>Mon, 18 Oct 2010 09:45:34 +0000</pubDate>
		<guid isPermaLink="false">http://prglab.com/blog/?page_id=27#comment-2640</guid>
		<description>最后一个时钟有问题，浏览器提示错误！</description>
		<content:encoded><![CDATA[<p>最后一个时钟有问题，浏览器提示错误！</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aqua</title>
		<link>http://www.prglab.com/blog/js-tutorial/js-date/comment-page-1#comment-2619</link>
		<dc:creator>Aqua</dc:creator>
		<pubDate>Thu, 30 Sep 2010 14:23:30 +0000</pubDate>
		<guid isPermaLink="false">http://prglab.com/blog/?page_id=27#comment-2619</guid>
		<description>不会又是引号的问题吧。浏览器有显示出错提示吗？</description>
		<content:encoded><![CDATA[<p>不会又是引号的问题吧。浏览器有显示出错提示吗？</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 电巴士</title>
		<link>http://www.prglab.com/blog/js-tutorial/js-date/comment-page-1#comment-2612</link>
		<dc:creator>电巴士</dc:creator>
		<pubDate>Mon, 27 Sep 2010 03:32:47 +0000</pubDate>
		<guid isPermaLink="false">http://prglab.com/blog/?page_id=27#comment-2612</guid>
		<description>最后一个显示时钟的 案例  好像时间是不跳动的 固定不变  要人为的 刷新 才会跳下</description>
		<content:encoded><![CDATA[<p>最后一个显示时钟的 案例  好像时间是不跳动的 固定不变  要人为的 刷新 才会跳下</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 初学JavaScript</title>
		<link>http://www.prglab.com/blog/js-tutorial/js-date/comment-page-1#comment-2586</link>
		<dc:creator>初学JavaScript</dc:creator>
		<pubDate>Tue, 17 Aug 2010 05:03:05 +0000</pubDate>
		<guid isPermaLink="false">http://prglab.com/blog/?page_id=27#comment-2586</guid>
		<description>最后一个例子中“t=setTimeout(‘startTime()’,500)
”是起什么作用的并且我试运行时，该段代码也不能正常显示的嘛(当中的符号问题我已经改了了哈)。</description>
		<content:encoded><![CDATA[<p>最后一个例子中“t=setTimeout(‘startTime()’,500)<br />
”是起什么作用的并且我试运行时，该段代码也不能正常显示的嘛(当中的符号问题我已经改了了哈)。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fdsaf</title>
		<link>http://www.prglab.com/blog/js-tutorial/js-date/comment-page-1#comment-2511</link>
		<dc:creator>fdsaf</dc:creator>
		<pubDate>Wed, 23 Jun 2010 05:57:10 +0000</pubDate>
		<guid isPermaLink="false">http://prglab.com/blog/?page_id=27#comment-2511</guid>
		<description>这个程序不能通过哦，不知道为什么</description>
		<content:encoded><![CDATA[<p>这个程序不能通过哦，不知道为什么</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sytb</title>
		<link>http://www.prglab.com/blog/js-tutorial/js-date/comment-page-1#comment-2259</link>
		<dc:creator>sytb</dc:creator>
		<pubDate>Fri, 06 Nov 2009 02:43:59 +0000</pubDate>
		<guid isPermaLink="false">http://prglab.com/blog/?page_id=27#comment-2259</guid>
		<description>喜欢你的知识！受益匪浅！thanks!</description>
		<content:encoded><![CDATA[<p>喜欢你的知识！受益匪浅！thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ma</title>
		<link>http://www.prglab.com/blog/js-tutorial/js-date/comment-page-1#comment-2197</link>
		<dc:creator>ma</dc:creator>
		<pubDate>Sun, 27 Sep 2009 09:08:56 +0000</pubDate>
		<guid isPermaLink="false">http://prglab.com/blog/?page_id=27#comment-2197</guid>
		<description>顶下</description>
		<content:encoded><![CDATA[<p>顶下</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jx</title>
		<link>http://www.prglab.com/blog/js-tutorial/js-date/comment-page-1#comment-1727</link>
		<dc:creator>jx</dc:creator>
		<pubDate>Sun, 21 Jun 2009 08:33:07 +0000</pubDate>
		<guid isPermaLink="false">http://prglab.com/blog/?page_id=27#comment-1727</guid>
		<description>通俗，简单，易懂！
好学</description>
		<content:encoded><![CDATA[<p>通俗，简单，易懂！<br />
好学</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: azheng</title>
		<link>http://www.prglab.com/blog/js-tutorial/js-date/comment-page-1#comment-917</link>
		<dc:creator>azheng</dc:creator>
		<pubDate>Thu, 19 Jun 2008 03:41:14 +0000</pubDate>
		<guid isPermaLink="false">http://prglab.com/blog/?page_id=27#comment-917</guid>
		<description>通俗，简单，易懂！</description>
		<content:encoded><![CDATA[<p>通俗，简单，易懂！</p>
]]></content:encoded>
	</item>
</channel>
</rss>

