﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>IT博客-这里的黄昏静悄悄-文章分类-Life</title><link>http://www.cnitblog.com/jackrain/category/213.html</link><description>I Like C++</description><language>zh-cn</language><lastBuildDate>Mon, 26 Sep 2011 21:54:29 GMT</lastBuildDate><pubDate>Mon, 26 Sep 2011 21:54:29 GMT</pubDate><ttl>60</ttl><item><title>JavaScript显示驱动器信息</title><link>http://www.cnitblog.com/jackrain/articles/1375.html</link><dc:creator>这里的黄昏静悄悄</dc:creator><author>这里的黄昏静悄悄</author><pubDate>Sun, 07 Aug 2005 01:01:00 GMT</pubDate><guid>http://www.cnitblog.com/jackrain/articles/1375.html</guid><wfw:comment>http://www.cnitblog.com/jackrain/comments/1375.html</wfw:comment><comments>http://www.cnitblog.com/jackrain/articles/1375.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/jackrain/comments/commentRss/1375.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/jackrain/services/trackbacks/1375.html</trackback:ping><description><![CDATA[摘要：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; JavaScript（这里指在浏览器中运行的JavaScript而非直接运行的JS）利用ActiveXObject控件可以操作机器上的文件。这里说一下显示驱动器信息的方法。<BR><BR>关键字：Drives集合、JavaScript <BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 利用JavaScript显示驱动器信息主要利用Drives集合，该集合包括驱动器的一般信息，如驱动器类型、容量、可用容量等等！但是首先我们应该建立ActiveXObject的FSO对象。方法如下<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <CODE><FONT color=#0000ff>var&nbsp;fso = new ActiveXObject("Scripting.FileSystemObject");<BR>这样我们就能用FileSystemObject了。<BR>&nbsp;&nbsp;&nbsp; <FONT style="BACKGROUND-COLOR: #a9a9a9">var DriveSet = new Enumerator (fso.Drives);<BR>&nbsp;&nbsp;&nbsp; var DriveInfo, DriveItem;<BR>&nbsp;&nbsp;&nbsp; for(; !DriveSet.atEnd(); DriveSet.moveNext())<BR>&nbsp;&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DriveItem = DriveInfo.item();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//下面就可以显示letter/totalsize/freespace/drivetype/serialnumber等信息了。<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(DriveItem.IsReady) // IsReady?<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;switch(DriveItem.DriveType)&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case 1: break;//floppy drive<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case 2: break;//fixed drive<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// other types<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Math.round（DriveItem.TotalSize/1024/1024/1024*100）/100&nbsp;&nbsp;&nbsp;保留2位小数GB<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// DriveItem.FreeSpace<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// DriveItem.ShareName<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// DriveItem.SerialNumber<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// DriveItem.SystemType<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//...<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR></FONT><BR>具体用法可以自己试试</FONT></CODE><img src ="http://www.cnitblog.com/jackrain/aggbug/1375.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/jackrain/" target="_blank">这里的黄昏静悄悄</a> 2005-08-07 09:01 <a href="http://www.cnitblog.com/jackrain/articles/1375.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>开门红</title><link>http://www.cnitblog.com/jackrain/articles/620.html</link><dc:creator>这里的黄昏静悄悄</dc:creator><author>这里的黄昏静悄悄</author><pubDate>Tue, 28 Jun 2005 05:40:00 GMT</pubDate><guid>http://www.cnitblog.com/jackrain/articles/620.html</guid><wfw:comment>http://www.cnitblog.com/jackrain/comments/620.html</wfw:comment><comments>http://www.cnitblog.com/jackrain/articles/620.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/jackrain/comments/commentRss/620.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/jackrain/services/trackbacks/620.html</trackback:ping><description><![CDATA[<SPAN style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">&nbsp; 我是</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10.5pt; FONT-FAMILY: 'Times New Roman'; mso-bidi-font-size: 12.0pt; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">C++</SPAN><SPAN style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">的忠实信徒，当然我并不排斥其他的语言，只是衷心不二的学者</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10.5pt; FONT-FAMILY: 'Times New Roman'; mso-bidi-font-size: 12.0pt; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">C++</SPAN><SPAN style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">。喜欢编程，是骨子里流淌的血决定的。我喜欢设计、制造东西，希望用自己的智慧创造出好的软件，更好的为人类服务！不要以为我在唱高调，</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10.5pt; FONT-FAMILY: 'Times New Roman'; mso-bidi-font-size: 12.0pt; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">15</SPAN><SPAN style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">年的学生生涯并没有让我形成为中华民族而奋斗的决心，反而是毕业之后的社会生活让我有了这种冲动，看到中国软件的落后，我愤恨不已，但我不会充当一个愤青的角色，我要用我的双手实现我的梦想，我愿意为中华民族而奋斗终生！人民是我们的人民，国家是我们的国家，我们不做谁做，我们不努力谁努力！在这个物欲横流，人性迷茫的时代，人们都迷失了方向，失去了信仰，大多数人都生活在得过且过的虚幻里，那些真正重要的东西并没有变，</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10.5pt; FONT-FAMILY: 'Times New Roman'; mso-bidi-font-size: 12.0pt; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">1+1</SPAN><SPAN style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">仍然等于</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10.5pt; FONT-FAMILY: 'Times New Roman'; mso-bidi-font-size: 12.0pt; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">2</SPAN><SPAN style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">。眼花缭乱的世界迷住了我们心灵的判断力，<SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">但是“发掌才是硬道理”没有变，</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">1+1</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">还是等于</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">2</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">！不要在为了生活琐事浪费青春，人生坎坷多了，何必在造人为的祸事，与人与己有什么用啊！</SPAN>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 150%"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><FONT color=#ff0000>&nbsp; <FONT size=4>“ 堂堂正正做人，踏踏实实做事”！</FONT></FONT>与志同道合者共勉！</SPAN></P><SPAN style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">&nbsp;&nbsp; <FONT size=4>为中华民族的振兴而奋斗！<IMG height=20 src="http://www.cnitblog.com/Emoticons/hitwall.gif" width=25 border=0></FONT></SPAN></SPAN><img src ="http://www.cnitblog.com/jackrain/aggbug/620.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/jackrain/" target="_blank">这里的黄昏静悄悄</a> 2005-06-28 13:40 <a href="http://www.cnitblog.com/jackrain/articles/620.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>