﻿<?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>BlogJava-&lt;maque&gt;&lt;font color=blue&gt;楚 &amp;nbsp; 客&lt;/font&gt;&lt;/maque&gt;-文章分类-HTML</title><link>http://www.blogjava.net/nayanliu/category/1294.html</link><description>&lt;marquee direction="up" scrollamount=2 height="120" align="right"&gt;
&lt;font color=green&gt;有关PHP,Python,Java,的东东&lt;/font&gt;
&lt;a href="http://a.netbig.com/account/100333"&gt;我的账本&lt;/a&gt;
&lt;/marquee&gt;</description><language>zh-cn</language><lastBuildDate>Tue, 27 Feb 2007 12:32:56 GMT</lastBuildDate><pubDate>Tue, 27 Feb 2007 12:32:56 GMT</pubDate><ttl>60</ttl><item><title>鼠标右键菜单</title><link>http://www.blogjava.net/nayanliu/articles/8625.html</link><dc:creator>楚客</dc:creator><author>楚客</author><pubDate>Thu, 28 Jul 2005 06:02:00 GMT</pubDate><guid>http://www.blogjava.net/nayanliu/articles/8625.html</guid><wfw:comment>http://www.blogjava.net/nayanliu/comments/8625.html</wfw:comment><comments>http://www.blogjava.net/nayanliu/articles/8625.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/nayanliu/comments/commentRss/8625.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/nayanliu/services/trackbacks/8625.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"&gt;&lt;HTML&gt;&lt;HEAD&gt;&lt;TITLE&gt;mouse-menu&lt;/TITLE&gt;&lt;META content="text/html; charset=gb2312" http-equiv=Content-Type&gt...&nbsp;&nbsp;<a href='http://www.blogjava.net/nayanliu/articles/8625.html'>阅读全文</a><img src ="http://www.blogjava.net/nayanliu/aggbug/8625.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/nayanliu/" target="_blank">楚客</a> 2005-07-28 14:02 <a href="http://www.blogjava.net/nayanliu/articles/8625.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>文本框输入限制</title><link>http://www.blogjava.net/nayanliu/articles/8618.html</link><dc:creator>楚客</dc:creator><author>楚客</author><pubDate>Thu, 28 Jul 2005 05:10:00 GMT</pubDate><guid>http://www.blogjava.net/nayanliu/articles/8618.html</guid><wfw:comment>http://www.blogjava.net/nayanliu/comments/8618.html</wfw:comment><comments>http://www.blogjava.net/nayanliu/articles/8618.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/nayanliu/comments/commentRss/8618.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/nayanliu/services/trackbacks/8618.html</trackback:ping><description><![CDATA[<P><FONT size=2>&lt;script&gt;<BR>&nbsp;function regInput(obj, reg, inputStr)<BR>&nbsp;{<BR>&nbsp; var docSel = document.selection.createRange()<BR>&nbsp; if (docSel.parentElement().tagName != "INPUT") return false<BR>&nbsp; oSel = docSel.duplicate()<BR>&nbsp; oSel.text = ""<BR>&nbsp; var srcRange = obj.createTextRange()<BR>&nbsp; oSel.setEndPoint("StartToStart", srcRange)<BR>&nbsp; var str = oSel.text + inputStr + srcRange.text.substr(oSel.text.length)<BR>&nbsp; return reg.test(str)<BR>&nbsp;}<BR>&lt;/script&gt;</FONT></P>
<P><FONT size=2>小写英文：&lt;xmp style= "display:inline"&gt; &lt;/xmp&gt;<BR>&lt;input onkeypress = "return regInput(this, /^[a-z]*$/,&nbsp; String.fromCharCode(event.keyCode))"<BR>&nbsp; onpaste&nbsp; = "return regInput(this, /^[a-z]*$/,&nbsp; window.clipboardData.getData('Text'))"<BR>&nbsp; ondrop&nbsp; = "return regInput(this, /^[a-z]*$/,&nbsp; event.dataTransfer.getData('Text'))"<BR>&nbsp; style="ime-mode:Disabled"<BR>&gt;&lt;br&gt;</FONT></P>
<P><FONT size=2>大写英文：&lt;xmp style= "display:inline"&gt; &lt;/xmp&gt;<BR>&lt;input onkeypress = "return regInput(this, /^[A-Z]*$/,&nbsp; String.fromCharCode(event.keyCode))"<BR>&nbsp; onpaste&nbsp; = "return regInput(this, /^[A-Z]*$/,&nbsp; window.clipboardData.getData('Text'))"<BR>&nbsp; ondrop&nbsp; = "return regInput(this, /^[A-Z]*$/,&nbsp; event.dataTransfer.getData('Text'))"<BR>&nbsp; style="ime-mode:Disabled"&gt;<BR>&lt;br&gt;</FONT></P>
<P><FONT size=2>任意数字：&lt;xmp style="display:inline"&gt; &lt;/xmp&gt;<BR>&lt;input onkeypress = "return regInput(this, /^[0-9]*$/,&nbsp; String.fromCharCode(event.keyCode))"<BR>&nbsp; onpaste&nbsp; = "return regInput(this, /^[0-9]*$/,&nbsp; window.clipboardData.getData('Text'))"<BR>&nbsp; ondrop&nbsp; = "return regInput(this, /^[0-9]*$/,&nbsp; event.dataTransfer.getData('Text'))"<BR>&nbsp; style="ime-mode:Disabled"<BR>&gt;&lt;br&gt;</FONT></P>
<P><FONT size=2>限2位小数：&lt;xmp style="display:inline"&gt; &lt;/xmp&gt;<BR>&lt;input onkeypress = "return regInput(this, /^\d*\.?\d{0,2}$/,&nbsp; String.fromCharCode(event.keyCode))"<BR>&nbsp; onpaste&nbsp; = "return regInput(this, /^\d*\.?\d{0,2}$/,&nbsp; window.clipboardData.getData('Text'))"<BR>&nbsp; ondrop&nbsp; = "return regInput(this, /^\d*\.?\d{0,2}$/,&nbsp; event.dataTransfer.getData('Text'))"<BR>&nbsp; style="ime-mode:Disabled"<BR>&gt; 如: 123.12&lt;br&gt;</FONT></P>
<P><BR><FONT size=2>日　&nbsp; 期：&lt;xmp style="display:inline"&gt; &lt;/xmp&gt;<BR>&lt;input onkeypress = "return regInput(this, /^\d{1,4}([-\/](\d{1,2}([-\/](\d{1,2})?)?)?)?$/,&nbsp; String.fromCharCode(event.keyCode))"<BR>&nbsp; onpaste&nbsp; = "return regInput(this, /^\d{1,4}([-\/](\d{1,2}([-\/](\d{1,2})?)?)?)?$/,&nbsp; window.clipboardData.getData('Text'))"<BR>&nbsp; ondrop&nbsp; = "return regInput(this, /^\d{1,4}([-\/](\d{1,2}([-\/](\d{1,2})?)?)?)?$/,&nbsp; event.dataTransfer.getData('Text'))"<BR>&nbsp; style="ime-mode:Disabled"<BR>&gt; 如: 2002-9-29&lt;br&gt;</FONT></P>
<P><FONT size=2>任意中文：&lt;xmp style="display:inline"&gt; &lt;/xmp&gt;<BR>&lt;input onkeypress = "return regInput(this, /^$/,&nbsp;&nbsp;&nbsp;&nbsp; String.fromCharCode(event.keyCode))"<BR>&nbsp; onpaste&nbsp; = "return regInput(this, /^[\u4E00-\u9FA5]*$/, window.clipboardData.getData('Text'))"<BR>&nbsp; ondrop&nbsp; = "return regInput(this, /^[\u4E00-\u9FA5]*$/, event.dataTransfer.getData('Text'))"<BR>&gt;&lt;br&gt;</FONT></P>
<P><FONT size=2>部分英文：&lt;xmp style="display:inline"&gt; &lt;/xmp&gt;<BR>&lt;input onkeypress = "return regInput(this, /^[a-e]*$/,&nbsp; String.fromCharCode(event.keyCode))"<BR>&nbsp; onpaste&nbsp; = "return regInput(this, /^[a-e]*$/,&nbsp; window.clipboardData.getData('Text'))"<BR>&nbsp; ondrop&nbsp; = "return regInput(this, /^[a-e]*$/,&nbsp; event.dataTransfer.getData('Text'))"<BR>&nbsp; style="ime-mode:Disabled"<BR>&gt; 范围: a,b,c,d,e&lt;br&gt;</FONT></P>
<P><FONT size=2>部分中文：&lt;xmp style="display:inline"&gt; &lt;/xmp&gt;</FONT></P>
<P><FONT size=2>&lt;script language=javascript&gt;<BR>function checkChinese(oldLength, obj)<BR>{<BR>&nbsp;var oTR = window.document.selection.createRange()<BR>&nbsp;var reg = /[^一二三四五六七八九十]/g<BR>&nbsp;oTR.moveStart("character", -1*(obj.value.length-oldLength))<BR>&nbsp;oTR.text = oTR.text.replace(reg, "")<BR>}<BR>&lt;/script&gt;<BR>&lt;input onkeypress="return false" onkeydown="setTimeout('checkChinese('+this.value.length+','+this.uniqueID+')', 1)"<BR>&nbsp; onpaste&nbsp; = "return regInput(this, /^[一二三四五六七八九十]*$/,&nbsp; window.clipboardData.getData('Text'))"<BR>&nbsp; ondrop&nbsp; = "return regInput(this, /^[一二三四五六七八九十]*$/,&nbsp; event.dataTransfer.getData('Text'))"<BR>&gt; 范围: 一二三四五六七八九十&lt;br&gt; <BR></FONT></P><img src ="http://www.blogjava.net/nayanliu/aggbug/8618.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/nayanliu/" target="_blank">楚客</a> 2005-07-28 13:10 <a href="http://www.blogjava.net/nayanliu/articles/8618.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>代码备忘</title><link>http://www.blogjava.net/nayanliu/articles/7926.html</link><dc:creator>楚客</dc:creator><author>楚客</author><pubDate>Mon, 18 Jul 2005 09:29:00 GMT</pubDate><guid>http://www.blogjava.net/nayanliu/articles/7926.html</guid><wfw:comment>http://www.blogjava.net/nayanliu/comments/7926.html</wfw:comment><comments>http://www.blogjava.net/nayanliu/articles/7926.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/nayanliu/comments/commentRss/7926.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/nayanliu/services/trackbacks/7926.html</trackback:ping><description><![CDATA[<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid">
<DIV><FONT size=2><SPAN style="COLOR: #008080">1</SPAN><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #008000">&lt;!--</SPAN><SPAN style="COLOR: #008000">&nbsp;关闭网页不弹出确认对话框&nbsp;</SPAN><SPAN style="COLOR: #008000">--&gt;</SPAN></FONT><SPAN style="COLOR: #000000"><BR></SPAN><FONT size=2><SPAN style="COLOR: #008080">2</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">a&nbsp;</SPAN><SPAN style="COLOR: #ff0000">href</SPAN><SPAN style="COLOR: #0000ff">="#"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;onClick</SPAN><SPAN style="COLOR: #0000ff">="opener='kingneed';window.close();"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">关闭</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">a</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN></FONT><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080"><FONT size=2>3</FONT></SPAN><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR></SPAN><SPAN style="COLOR: #008080">4</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #008000">&lt;!--</SPAN><SPAN style="COLOR: #008000">&nbsp;打开新窗口&nbsp;</SPAN><SPAN style="COLOR: #008000">--&gt;</SPAN></FONT><SPAN style="COLOR: #000000"><BR></SPAN><FONT size=2><SPAN style="COLOR: #008080">5</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_131_344_Open_Image onclick="this.style.display='none'; Codehighlighter1_131_344_Open_Text.style.display='none'; Codehighlighter1_131_344_Closed_Image.style.display='inline'; Codehighlighter1_131_344_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_131_344_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_131_344_Closed_Text.style.display='none'; Codehighlighter1_131_344_Open_Image.style.display='inline'; Codehighlighter1_131_344_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">script&nbsp;</SPAN><SPAN style="COLOR: #ff0000">language</SPAN><SPAN style="COLOR: #0000ff">="JavaScript"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN id=Codehighlighter1_131_344_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN></FONT><SPAN id=Codehighlighter1_131_344_Open_Text><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><BR></SPAN><FONT size=2><SPAN style="COLOR: #008080">6</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top></SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&lt;!--</SPAN></FONT><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><BR></SPAN><FONT size=2><SPAN style="COLOR: #008080">7</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>window.open&nbsp;(</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">selstep.php?user=SYSTEM&amp;id=</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">+</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">id</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">+</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&amp;item=</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">+</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">item</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">+</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&amp;act=modify</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">,&nbsp;</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">""</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">,</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">status=no,toolbar=no,scrollbars=no,titlebar=no,menubar=no,resizable=yes,width=500,height=450,directories=no,location=no</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">);<BR></SPAN><SPAN style="COLOR: #008080">8</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top></SPAN><SPAN style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5">//</SPAN><SPAN style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5">--&gt;</SPAN></FONT><SPAN style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5"><BR></SPAN><FONT size=2><SPAN style="COLOR: #008080">9</SPAN><SPAN style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN></FONT></SPAN><FONT size=2><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">script</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN></FONT></DIV></DIV><img src ="http://www.blogjava.net/nayanliu/aggbug/7926.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/nayanliu/" target="_blank">楚客</a> 2005-07-18 17:29 <a href="http://www.blogjava.net/nayanliu/articles/7926.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>自动填写表单</title><link>http://www.blogjava.net/nayanliu/articles/7925.html</link><dc:creator>楚客</dc:creator><author>楚客</author><pubDate>Mon, 18 Jul 2005 09:26:00 GMT</pubDate><guid>http://www.blogjava.net/nayanliu/articles/7925.html</guid><wfw:comment>http://www.blogjava.net/nayanliu/comments/7925.html</wfw:comment><comments>http://www.blogjava.net/nayanliu/articles/7925.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/nayanliu/comments/commentRss/7925.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/nayanliu/services/trackbacks/7925.html</trackback:ping><description><![CDATA[<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid">
<DIV><FONT size=2><SPAN style="COLOR: #008080">&nbsp;1</SPAN><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">P&nbsp;</SPAN><SPAN style="COLOR: #ff0000">class</SPAN><SPAN style="COLOR: #0000ff">=MsoNormal&nbsp;</SPAN><SPAN style="COLOR: #ff0000">style</SPAN><SPAN style="COLOR: #0000ff">="MARGIN:&nbsp;0cm&nbsp;0cm&nbsp;0pt"</SPAN><SPAN style="COLOR: #0000ff">&gt;&lt;</SPAN><SPAN style="COLOR: #800000">FONT&nbsp;</SPAN><SPAN style="COLOR: #ff0000">size</SPAN><SPAN style="COLOR: #0000ff">=3&gt;&lt;SPAN&nbsp;</SPAN><SPAN style="COLOR: #ff0000">lang</SPAN><SPAN style="COLOR: #0000ff">=EN-US&nbsp;</SPAN><SPAN style="COLOR: #ff0000">style</SPAN><SPAN style="COLOR: #0000ff">="FONT-FAMILY:&nbsp;Wingdings;&nbsp;mso-ascii-font-family:&nbsp;'Times&nbsp;New&nbsp;Roman';&nbsp;mso-hansi-font-family:&nbsp;'Times&nbsp;New&nbsp;Roman';&nbsp;mso-char-type:&nbsp;symbol;&nbsp;mso-symbol-font-family:&nbsp;Wingdings"</SPAN><SPAN style="COLOR: #0000ff">&gt;&lt;</SPAN><SPAN style="COLOR: #800000">SPAN&nbsp;</SPAN><SPAN style="COLOR: #ff0000">style</SPAN><SPAN style="COLOR: #0000ff">="mso-char-type:&nbsp;symbol;&nbsp;mso-symbol-font-family:&nbsp;Wingdings"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #ff0000">&amp;Oslash;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">SPAN</SPAN><SPAN style="COLOR: #0000ff">&gt;&lt;/</SPAN><SPAN style="COLOR: #800000">SPAN</SPAN><SPAN style="COLOR: #0000ff">&gt;&lt;</SPAN><SPAN style="COLOR: #800000">SPAN&nbsp;</SPAN><SPAN style="COLOR: #ff0000">lang</SPAN><SPAN style="COLOR: #0000ff">=EN-US&gt;&nbsp;</SPAN><SPAN style="COLOR: #ff0000">&lt;/SPAN</SPAN><SPAN style="COLOR: #0000ff">&gt;&lt;</SPAN><SPAN style="COLOR: #800000">SPAN&nbsp;</SPAN><SPAN style="COLOR: #ff0000">style</SPAN><SPAN style="COLOR: #0000ff">="FONT-FAMILY:&nbsp;宋体;&nbsp;mso-ascii-font-family:&nbsp;'Times&nbsp;New&nbsp;Roman';&nbsp;mso-hansi-font-family:&nbsp;'Times&nbsp;New&nbsp;Roman'"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">示例代码（为</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">SPAN</SPAN><SPAN style="COLOR: #0000ff">&gt;&lt;</SPAN><SPAN style="COLOR: #800000">SPAN&nbsp;</SPAN><SPAN style="COLOR: #ff0000">lang</SPAN><SPAN style="COLOR: #0000ff">=EN-US&gt;IE&lt;/SPAN&gt;&lt;SPAN&nbsp;</SPAN><SPAN style="COLOR: #ff0000">style</SPAN><SPAN style="COLOR: #0000ff">="FONT-FAMILY:&nbsp;宋体;&nbsp;mso-ascii-font-family:&nbsp;'Times&nbsp;New&nbsp;Roman';&nbsp;mso-hansi-font-family:&nbsp;'Times&nbsp;New&nbsp;Roman'"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">浏览器）：</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">SPAN</SPAN><SPAN style="COLOR: #0000ff">&gt;&lt;/</SPAN><SPAN style="COLOR: #800000">FONT</SPAN><SPAN style="COLOR: #0000ff">&gt;&lt;/</SPAN><SPAN style="COLOR: #800000">P</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN></FONT><SPAN style="COLOR: #000000"><BR></SPAN><FONT size=2><SPAN style="COLOR: #008080">&nbsp;2</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">P&nbsp;</SPAN><SPAN style="COLOR: #ff0000">class</SPAN><SPAN style="COLOR: #0000ff">=MsoNormal&nbsp;</SPAN><SPAN style="COLOR: #ff0000">style</SPAN><SPAN style="COLOR: #0000ff">="MARGIN:&nbsp;0cm&nbsp;0cm&nbsp;0pt"</SPAN><SPAN style="COLOR: #0000ff">&gt;&lt;</SPAN><SPAN style="COLOR: #800000">FONT&nbsp;</SPAN><SPAN style="COLOR: #ff0000">size</SPAN><SPAN style="COLOR: #0000ff">=3&gt;&lt;SPAN&nbsp;</SPAN><SPAN style="COLOR: #ff0000">style</SPAN><SPAN style="COLOR: #0000ff">="FONT-FAMILY:&nbsp;宋体;&nbsp;mso-ascii-font-family:&nbsp;'Times&nbsp;New&nbsp;Roman';&nbsp;mso-hansi-font-family:&nbsp;'Times&nbsp;New&nbsp;Roman'"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">说明：该示例码在</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">SPAN</SPAN><SPAN style="COLOR: #0000ff">&gt;&lt;</SPAN><SPAN style="COLOR: #800000">SPAN&nbsp;</SPAN><SPAN style="COLOR: #ff0000">lang</SPAN><SPAN style="COLOR: #0000ff">=EN-US&gt;NetScape&lt;/SPAN&gt;&lt;SPAN&nbsp;</SPAN><SPAN style="COLOR: #ff0000">style</SPAN><SPAN style="COLOR: #0000ff">="FONT-FAMILY:&nbsp;宋体;&nbsp;mso-ascii-font-family:&nbsp;'Times&nbsp;New&nbsp;Roman';&nbsp;mso-hansi-font-family:&nbsp;'Times&nbsp;New&nbsp;Roman'"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">或</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">SPAN</SPAN><SPAN style="COLOR: #0000ff">&gt;&lt;</SPAN><SPAN style="COLOR: #800000">SPAN&nbsp;</SPAN><SPAN style="COLOR: #ff0000">lang</SPAN><SPAN style="COLOR: #0000ff">=EN-US&gt;Oprea&lt;/SPAN&gt;&lt;SPAN&nbsp;</SPAN><SPAN style="COLOR: #ff0000">style</SPAN><SPAN style="COLOR: #0000ff">="FONT-FAMILY:&nbsp;宋体;&nbsp;mso-ascii-font-family:&nbsp;'Times&nbsp;New&nbsp;Roman';&nbsp;mso-hansi-font-family:&nbsp;'Times&nbsp;New&nbsp;Roman'"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">浏览器中可能不会很好的执行，另外，如果你了非键盘输入（鼠标复制／粘贴），也不会执行。</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">SPAN</SPAN><SPAN style="COLOR: #0000ff">&gt;&lt;/</SPAN><SPAN style="COLOR: #800000">FONT</SPAN><SPAN style="COLOR: #0000ff">&gt;&lt;/</SPAN><SPAN style="COLOR: #800000">P</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN></FONT><SPAN style="COLOR: #000000"><BR></SPAN><FONT size=2><SPAN style="COLOR: #008080">&nbsp;3</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">P&nbsp;</SPAN><SPAN style="COLOR: #ff0000">class</SPAN><SPAN style="COLOR: #0000ff">=MsoNormal&nbsp;</SPAN><SPAN style="COLOR: #ff0000">style</SPAN><SPAN style="COLOR: #0000ff">="MARGIN:&nbsp;0cm&nbsp;0cm&nbsp;0pt"</SPAN><SPAN style="COLOR: #0000ff">&gt;&lt;</SPAN><SPAN style="COLOR: #800000">SPAN&nbsp;</SPAN><SPAN style="COLOR: #ff0000">lang</SPAN><SPAN style="COLOR: #0000ff">=EN-US&gt;&lt;o:p&gt;&lt;FONT&nbsp;</SPAN><SPAN style="COLOR: #ff0000">size</SPAN></FONT><FONT size=2><SPAN style="COLOR: #0000ff">=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;4</SPAN><SPAN style="COLOR: #0000ff"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #ff0000">&lt;SCRIPT&nbsp;language</SPAN><SPAN style="COLOR: #0000ff">=JScript&nbsp;</SPAN><SPAN style="COLOR: #ff0000">type</SPAN></FONT><FONT size=2><SPAN style="COLOR: #0000ff">=text/javascript&gt;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;5</SPAN><SPAN style="COLOR: #0000ff"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #ff0000">var&nbsp;isOpera&nbsp;</SPAN><SPAN style="COLOR: #0000ff">=&nbsp;navigator.userAgent.indexOf("Opera")&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000">&nbsp;-1;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;6</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>var&nbsp;isIE&nbsp;=&nbsp;navigator.userAgent.indexOf("MSIE")&nbsp;&gt;&nbsp;1&nbsp;&amp;&amp;&nbsp;!isOpera;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;7</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>var&nbsp;isMoz&nbsp;=&nbsp;navigator.userAgent.indexOf("Mozilla/5.")&nbsp;==&nbsp;0&nbsp;&amp;&amp;&nbsp;!isOpera;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;8</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>function&nbsp;textboxSelect&nbsp;(oTextbox,&nbsp;iStart,&nbsp;iEnd)&nbsp;{&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;9</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;switch(arguments.length)&nbsp;{&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">10</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;1:&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">11</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;oTextbox.select();&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">12</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">13</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;2:&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">14</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iEnd&nbsp;=&nbsp;oTextbox.value.length;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">15</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/*&nbsp;falls&nbsp;through&nbsp;*/&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">16</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">17</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;3:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">18</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(isIE)&nbsp;{&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">19</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;oRange&nbsp;=&nbsp;oTextbox.createTextRange();&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">20</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;oRange.moveStart("character",&nbsp;iStart);&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">21</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;oRange.moveEnd("character",&nbsp;-oTextbox.value.length&nbsp;+&nbsp;iEnd);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">22</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;oRange.select();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">23</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;else&nbsp;if&nbsp;(isMoz){&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">24</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;oTextbox.setSelectionRange(iStart,&nbsp;iEnd);&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">25</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">26</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;}&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">27</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;oTextbox.focus();&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">28</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>}&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">29</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>/*<BR></SPAN><SPAN style="COLOR: #008080">30</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>function&nbsp;textboxReplaceSelect&nbsp;(oTextbox,&nbsp;sText)&nbsp;{&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">31</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;if&nbsp;(isIE)&nbsp;{&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">32</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;oRange&nbsp;=&nbsp;oTextbox.createTextRange();&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">33</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;oRange.text&nbsp;=&nbsp;sText;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">34</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;oRange.collapse(true);&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">35</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;oRange.select();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">36</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;}&nbsp;else&nbsp;if&nbsp;(isMoz)&nbsp;{&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">37</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;iStart&nbsp;=&nbsp;oTextbox.selectionStart;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">38</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;oTextbox.value&nbsp;=&nbsp;oTextbox.value.substring(0,&nbsp;iStart)&nbsp;+&nbsp;sText&nbsp;+&nbsp;oTextbox.value.substring(oTextbox.selectionEnd,&nbsp;oTextbox.value.length);&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">39</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;oTextbox.setSelectionRange(iStart&nbsp;+&nbsp;sText.length,&nbsp;iStart&nbsp;+&nbsp;sText.length);&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">40</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;}&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">41</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;oTextbox.focus();&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">42</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>}&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">43</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>*/<BR></SPAN><SPAN style="COLOR: #008080">44</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>function&nbsp;autocompleteMatch&nbsp;(sText,&nbsp;arrValues)&nbsp;{&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">45</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;for&nbsp;(var&nbsp;i=0;&nbsp;i&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">&nbsp;arrValues</SPAN></FONT><FONT size=2><SPAN style="COLOR: #ff0000">.length;&nbsp;i++)&nbsp;{&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">46</SPAN><SPAN style="COLOR: #ff0000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(arrValues[i].indexOf(sText)&nbsp;</SPAN><SPAN style="COLOR: #0000ff">==&nbsp;</SPAN></FONT><FONT size=2><SPAN style="COLOR: #ff0000">0)&nbsp;{&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">47</SPAN></FONT><FONT size=2><SPAN style="COLOR: #ff0000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;arrValues[i];&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">48</SPAN></FONT><FONT size=2><SPAN style="COLOR: #ff0000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">49</SPAN></FONT><FONT size=2><SPAN style="COLOR: #ff0000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;}&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">50</SPAN></FONT><FONT size=2><SPAN style="COLOR: #ff0000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;return&nbsp;null;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">51</SPAN></FONT><FONT size=2><SPAN style="COLOR: #ff0000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>}&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">52</SPAN></FONT><FONT size=2><SPAN style="COLOR: #ff0000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>function&nbsp;autocomplete(oTextbox,&nbsp;oEvent,&nbsp;arrValues)&nbsp;{&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">53</SPAN></FONT><FONT size=2><SPAN style="COLOR: #ff0000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;switch&nbsp;(oEvent.keyCode)&nbsp;{&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">54</SPAN></FONT><FONT size=2><SPAN style="COLOR: #ff0000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;38:&nbsp;//up&nbsp;arrow&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">55</SPAN></FONT><FONT size=2><SPAN style="COLOR: #ff0000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;40:&nbsp;//down&nbsp;arrow&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">56</SPAN></FONT><FONT size=2><SPAN style="COLOR: #ff0000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;37:&nbsp;//left&nbsp;arrow&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">57</SPAN></FONT><FONT size=2><SPAN style="COLOR: #ff0000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;39:&nbsp;//right&nbsp;arrow&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">58</SPAN></FONT><FONT size=2><SPAN style="COLOR: #ff0000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;33:&nbsp;//page&nbsp;up&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">59</SPAN></FONT><FONT size=2><SPAN style="COLOR: #ff0000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;34:&nbsp;//page&nbsp;down&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">60</SPAN></FONT><FONT size=2><SPAN style="COLOR: #ff0000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;36:&nbsp;//home&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">61</SPAN></FONT><FONT size=2><SPAN style="COLOR: #ff0000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;35:&nbsp;//end&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">62</SPAN></FONT><FONT size=2><SPAN style="COLOR: #ff0000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;13:&nbsp;//enter&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">63</SPAN></FONT><FONT size=2><SPAN style="COLOR: #ff0000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;9:&nbsp;//tab&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">64</SPAN></FONT><FONT size=2><SPAN style="COLOR: #ff0000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;27:&nbsp;//esc&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">65</SPAN></FONT><FONT size=2><SPAN style="COLOR: #ff0000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;16:&nbsp;//shift&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">66</SPAN></FONT><FONT size=2><SPAN style="COLOR: #ff0000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;17:&nbsp;//ctrl&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">67</SPAN></FONT><FONT size=2><SPAN style="COLOR: #ff0000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;18:&nbsp;//alt&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">68</SPAN></FONT><FONT size=2><SPAN style="COLOR: #ff0000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;20:&nbsp;//caps&nbsp;lock&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">69</SPAN></FONT><FONT size=2><SPAN style="COLOR: #ff0000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;8:&nbsp;//backspace&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">70</SPAN></FONT><FONT size=2><SPAN style="COLOR: #ff0000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;46:&nbsp;//delete&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">71</SPAN></FONT><FONT size=2><SPAN style="COLOR: #ff0000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;true;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">72</SPAN></FONT><FONT size=2><SPAN style="COLOR: #ff0000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">73</SPAN></FONT><FONT size=2><SPAN style="COLOR: #ff0000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;default:&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">74</SPAN></FONT><FONT size=2><SPAN style="COLOR: #ff0000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;下面这一行用处不大(被注释)<BR></SPAN><SPAN style="COLOR: #008080">75</SPAN></FONT><FONT size=2><SPAN style="COLOR: #ff0000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//textboxReplaceSelect(oTextbox,&nbsp;isIE&nbsp;?&nbsp;oTextbox.value/*oEvent.keyCode*/&nbsp;:&nbsp;oEvent.charCode);&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">76</SPAN><SPAN style="COLOR: #ff0000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;iLen&nbsp;</SPAN></FONT><FONT size=2><SPAN style="COLOR: #0000ff">=&nbsp;oTextbox.value.length;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">77</SPAN><SPAN style="COLOR: #0000ff"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #ff0000">var&nbsp;sMatch&nbsp;</SPAN><SPAN style="COLOR: #0000ff">=&nbsp;autocompleteMatch(oTextbox.value,&nbsp;</SPAN></FONT><FONT size=2><SPAN style="COLOR: #ff0000">arrValues);&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">78</SPAN><SPAN style="COLOR: #ff0000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(sMatch&nbsp;!</SPAN><SPAN style="COLOR: #0000ff">=&nbsp;null)&nbsp;</SPAN></FONT><FONT size=2><SPAN style="COLOR: #ff0000">{&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">79</SPAN><SPAN style="COLOR: #ff0000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;oTextbox.value&nbsp;</SPAN></FONT><FONT size=2><SPAN style="COLOR: #0000ff">=&nbsp;sMatch;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">80</SPAN><SPAN style="COLOR: #0000ff"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN></FONT><FONT size=2><SPAN style="COLOR: #ff0000">textboxSelect(oTextbox,&nbsp;iLen,&nbsp;oTextbox.value.length);&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">81</SPAN></FONT><FONT size=2><SPAN style="COLOR: #ff0000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">82</SPAN></FONT><FONT size=2><SPAN style="COLOR: #ff0000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">83</SPAN></FONT><FONT size=2><SPAN style="COLOR: #ff0000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;false;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">84</SPAN></FONT><FONT size=2><SPAN style="COLOR: #ff0000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;}&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">85</SPAN></FONT><FONT size=2><SPAN style="COLOR: #ff0000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>}&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">86</SPAN><SPAN style="COLOR: #ff0000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/SCRIPT</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN></FONT><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080"><FONT size=2>87</FONT></SPAN><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR></SPAN><SPAN style="COLOR: #008080">88</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_4164_4286_Open_Image onclick="this.style.display='none'; Codehighlighter1_4164_4286_Open_Text.style.display='none'; Codehighlighter1_4164_4286_Closed_Image.style.display='inline'; Codehighlighter1_4164_4286_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_4164_4286_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_4164_4286_Closed_Text.style.display='none'; Codehighlighter1_4164_4286_Open_Image.style.display='inline'; Codehighlighter1_4164_4286_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">SCRIPT</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN id=Codehighlighter1_4164_4286_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN></FONT><SPAN id=Codehighlighter1_4164_4286_Open_Text><FONT size=2><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">89</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">var</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;arrValues&nbsp;</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;[</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">Road</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">,</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">red</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">,&nbsp;</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">orange</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">,&nbsp;</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">yellow</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">,&nbsp;</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">green</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">,&nbsp;</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">blue</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">,&nbsp;</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">indigo</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">,&nbsp;</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">violet</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">,&nbsp;</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">brown</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</SPAN></FONT><FONT size=2><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">];&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">90</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN></FONT></SPAN><FONT size=2><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">SCRIPT</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN></FONT><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080"><FONT size=2>91</FONT></SPAN><FONT size=2><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR></SPAN><SPAN style="COLOR: #008080">92</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">H2</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">Autocomplete&nbsp;Textbox&nbsp;Example</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">H2</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN></FONT><SPAN style="COLOR: #000000"><BR></SPAN><FONT size=2><SPAN style="COLOR: #008080">93</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">P</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">Type&nbsp;in&nbsp;a&nbsp;color&nbsp;in&nbsp;lowercase:输入一个以小写字母开头的颜色(英文单词)</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">BR</SPAN><SPAN style="COLOR: #0000ff">&gt;&lt;</SPAN><SPAN style="COLOR: #800000">INPUT&nbsp;</SPAN><SPAN style="COLOR: #ff0000">id</SPAN><SPAN style="COLOR: #0000ff">=txt1&nbsp;</SPAN><SPAN style="COLOR: #ff0000">onkeyup</SPAN><SPAN style="COLOR: #0000ff">="return&nbsp;autocomplete(this,&nbsp;event,&nbsp;arrValues)"</SPAN><SPAN style="COLOR: #0000ff">&gt;&lt;/</SPAN><SPAN style="COLOR: #800000">P</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN></FONT></DIV></DIV><img src ="http://www.blogjava.net/nayanliu/aggbug/7925.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/nayanliu/" target="_blank">楚客</a> 2005-07-18 17:26 <a href="http://www.blogjava.net/nayanliu/articles/7925.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>双下拉列表</title><link>http://www.blogjava.net/nayanliu/articles/7924.html</link><dc:creator>楚客</dc:creator><author>楚客</author><pubDate>Mon, 18 Jul 2005 09:23:00 GMT</pubDate><guid>http://www.blogjava.net/nayanliu/articles/7924.html</guid><wfw:comment>http://www.blogjava.net/nayanliu/comments/7924.html</wfw:comment><comments>http://www.blogjava.net/nayanliu/articles/7924.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/nayanliu/comments/commentRss/7924.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/nayanliu/services/trackbacks/7924.html</trackback:ping><description><![CDATA[<P>&nbsp;</P>
<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid">
<DIV><SPAN style="COLOR: #008080">&nbsp;1</SPAN><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">html</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;2</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">head</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;3</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">title</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">杰易CMS</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">title</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;4</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">meta&nbsp;</SPAN><SPAN style="COLOR: #ff0000">http-equiv</SPAN><SPAN style="COLOR: #0000ff">="Content-Type"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;content</SPAN><SPAN style="COLOR: #0000ff">="text/html;&nbsp;charset=gb2312"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;5</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_136_930_Open_Image onclick="this.style.display='none'; Codehighlighter1_136_930_Open_Text.style.display='none'; Codehighlighter1_136_930_Closed_Image.style.display='inline'; Codehighlighter1_136_930_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_136_930_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_136_930_Closed_Text.style.display='none'; Codehighlighter1_136_930_Open_Image.style.display='inline'; Codehighlighter1_136_930_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">script&nbsp;</SPAN><SPAN style="COLOR: #ff0000">language</SPAN><SPAN style="COLOR: #0000ff">="JavaScript"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN id=Codehighlighter1_136_930_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_136_930_Open_Text><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;6</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top></SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&lt;!--</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;7</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top></SPAN><SPAN style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">var</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;sectioncategories&nbsp;</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;</SPAN><SPAN style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">new</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;Array;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;8</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>sectioncategories[</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">0</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">]&nbsp;</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;</SPAN><SPAN style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">new</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;Array(&nbsp;'</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">-</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">1</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">','</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">-</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">1</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">','请选择'&nbsp;);<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;9</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>sectioncategories[</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">1</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">]&nbsp;</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;</SPAN><SPAN style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">new</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;Array(&nbsp;'</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">1</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">','</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">1</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">','A1'&nbsp;);<BR></SPAN><SPAN style="COLOR: #008080">10</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>sectioncategories[</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">2</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">]&nbsp;</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;</SPAN><SPAN style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">new</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;Array(&nbsp;'</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">2</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">','</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">2</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">','B2'&nbsp;);<BR></SPAN><SPAN style="COLOR: #008080">11</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>sectioncategories[</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">3</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">]&nbsp;</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;</SPAN><SPAN style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">new</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;Array(&nbsp;'</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">3</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">','</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">3</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">','C3'&nbsp;);<BR></SPAN><SPAN style="COLOR: #008080">12</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>sectioncategories[</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">4</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">]&nbsp;</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;</SPAN><SPAN style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">new</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;Array(&nbsp;'</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">3</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">','</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">4</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">','C4'&nbsp;);<BR></SPAN><SPAN style="COLOR: #008080">13</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top><BR></SPAN><SPAN style="COLOR: #008080">14</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><IMG id=Codehighlighter1_500_923_Open_Image onclick="this.style.display='none'; Codehighlighter1_500_923_Open_Text.style.display='none'; Codehighlighter1_500_923_Closed_Image.style.display='inline'; Codehighlighter1_500_923_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_500_923_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_500_923_Closed_Text.style.display='none'; Codehighlighter1_500_923_Open_Image.style.display='inline'; Codehighlighter1_500_923_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top></SPAN><SPAN style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">function</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;changeDynaList(&nbsp;listname,&nbsp;source,&nbsp;key,&nbsp;orig_key,&nbsp;orig_val&nbsp;)&nbsp;</SPAN><SPAN id=Codehighlighter1_500_923_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_500_923_Open_Text><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">{<BR></SPAN><SPAN style="COLOR: #008080">15</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">var</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;list&nbsp;</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;eval(&nbsp;'document.adminForm.'&nbsp;</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">+</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;listname&nbsp;);<BR></SPAN><SPAN style="COLOR: #008080">16</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5">//</SPAN><SPAN style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5">&nbsp;empty&nbsp;the&nbsp;list</SPAN><SPAN style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5"><BR></SPAN><SPAN style="COLOR: #008080">17</SPAN><SPAN style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5"><IMG id=Codehighlighter1_607_636_Open_Image onclick="this.style.display='none'; Codehighlighter1_607_636_Open_Text.style.display='none'; Codehighlighter1_607_636_Closed_Image.style.display='inline'; Codehighlighter1_607_636_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_607_636_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_607_636_Closed_Text.style.display='none'; Codehighlighter1_607_636_Open_Image.style.display='inline'; Codehighlighter1_607_636_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top></SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">for</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;(i&nbsp;</SPAN><SPAN style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">in</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;list.options.length)&nbsp;</SPAN><SPAN id=Codehighlighter1_607_636_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_607_636_Open_Text><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">{<BR></SPAN><SPAN style="COLOR: #008080">18</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;list.options[i]&nbsp;</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;</SPAN><SPAN style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">null</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;<BR></SPAN><SPAN style="COLOR: #008080">19</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><BR></SPAN><SPAN style="COLOR: #008080">20</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;i&nbsp;</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">0</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;<BR></SPAN><SPAN style="COLOR: #008080">21</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><IMG id=Codehighlighter1_665_903_Open_Image onclick="this.style.display='none'; Codehighlighter1_665_903_Open_Text.style.display='none'; Codehighlighter1_665_903_Closed_Image.style.display='inline'; Codehighlighter1_665_903_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_665_903_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_665_903_Closed_Text.style.display='none'; Codehighlighter1_665_903_Open_Image.style.display='inline'; Codehighlighter1_665_903_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">for</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;(x&nbsp;</SPAN><SPAN style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">in</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;source)&nbsp;</SPAN><SPAN id=Codehighlighter1_665_903_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_665_903_Open_Text><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">{<BR></SPAN><SPAN style="COLOR: #008080">22</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><IMG id=Codehighlighter1_694_900_Open_Image onclick="this.style.display='none'; Codehighlighter1_694_900_Open_Text.style.display='none'; Codehighlighter1_694_900_Closed_Image.style.display='inline'; Codehighlighter1_694_900_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_694_900_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_694_900_Closed_Text.style.display='none'; Codehighlighter1_694_900_Open_Image.style.display='inline'; Codehighlighter1_694_900_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">if</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;(source[x][</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">0</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">]&nbsp;</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">==</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;key)&nbsp;</SPAN><SPAN id=Codehighlighter1_694_900_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_694_900_Open_Text><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">{<BR></SPAN><SPAN style="COLOR: #008080">23</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;opt&nbsp;</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;</SPAN><SPAN style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">new</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;Option();<BR></SPAN><SPAN style="COLOR: #008080">24</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;opt.value&nbsp;</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;source[x][</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">1</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">];<BR></SPAN><SPAN style="COLOR: #008080">25</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;opt.text&nbsp;</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;source[x][</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">2</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">];<BR></SPAN><SPAN style="COLOR: #008080">26</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top><BR></SPAN><SPAN style="COLOR: #008080">27</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><IMG id=Codehighlighter1_838_868_Open_Image onclick="this.style.display='none'; Codehighlighter1_838_868_Open_Text.style.display='none'; Codehighlighter1_838_868_Closed_Image.style.display='inline'; Codehighlighter1_838_868_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_838_868_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_838_868_Closed_Text.style.display='none'; Codehighlighter1_838_868_Open_Image.style.display='inline'; Codehighlighter1_838_868_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">if</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;((orig_key&nbsp;</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">==</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;key&nbsp;</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&amp;&amp;</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;orig_val&nbsp;</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">==</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;opt.value)&nbsp;</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">||</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;i&nbsp;</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">==</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">0</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">)&nbsp;</SPAN><SPAN id=Codehighlighter1_838_868_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_838_868_Open_Text><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">{<BR></SPAN><SPAN style="COLOR: #008080">28</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;opt.selected&nbsp;</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;</SPAN><SPAN style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">true</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;<BR></SPAN><SPAN style="COLOR: #008080">29</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><BR></SPAN><SPAN style="COLOR: #008080">30</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;list.options[i</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">++</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">]&nbsp;</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;opt;<BR></SPAN><SPAN style="COLOR: #008080">31</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><BR></SPAN><SPAN style="COLOR: #008080">32</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><BR></SPAN><SPAN style="COLOR: #008080">33</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;list.length&nbsp;</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;i;<BR></SPAN><SPAN style="COLOR: #008080">34</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>}</SPAN></SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><BR></SPAN><SPAN style="COLOR: #008080">35</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top></SPAN><SPAN style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5">//</SPAN><SPAN style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5">--&gt;</SPAN><SPAN style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5"><BR></SPAN><SPAN style="COLOR: #008080">36</SPAN><SPAN style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN></SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">script</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">37</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">head</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">38</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR></SPAN><SPAN style="COLOR: #008080">39</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">body</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">40</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">br&nbsp;</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">41</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">form&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="adminForm"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;action</SPAN><SPAN style="COLOR: #0000ff">="index2.php"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;method</SPAN><SPAN style="COLOR: #0000ff">="post"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">42</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #ff0000">&amp;nbsp;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">43</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">select&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="sectionid"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;onchange</SPAN><SPAN style="COLOR: #0000ff">="changeDynaList(&nbsp;'catid',&nbsp;sectioncategories,&nbsp;document.adminForm.sectionid.options[document.adminForm.sectionid.selectedIndex].value,&nbsp;0,&nbsp;0);"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">44</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">option&nbsp;</SPAN><SPAN style="COLOR: #ff0000">value</SPAN><SPAN style="COLOR: #0000ff">="1"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;selected</SPAN><SPAN style="COLOR: #0000ff">="selected"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">A</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">option</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">45</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">option&nbsp;</SPAN><SPAN style="COLOR: #ff0000">value</SPAN><SPAN style="COLOR: #0000ff">="2"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">B</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">option</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">46</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">option&nbsp;</SPAN><SPAN style="COLOR: #ff0000">value</SPAN><SPAN style="COLOR: #0000ff">="3"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">C</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">option</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">47</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">select</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #ff0000">&amp;nbsp;&amp;nbsp;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">48</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">select&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="catid"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">49</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">option&nbsp;</SPAN><SPAN style="COLOR: #ff0000">value</SPAN><SPAN style="COLOR: #0000ff">="-1"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">请选择</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">option</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">50</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">option&nbsp;</SPAN><SPAN style="COLOR: #ff0000">value</SPAN><SPAN style="COLOR: #0000ff">="1"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;selected</SPAN><SPAN style="COLOR: #0000ff">="selected"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">A1</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">option</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">51</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">select</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">52</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">form</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">53</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">body</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">54</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">html</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN></DIV></DIV><img src ="http://www.blogjava.net/nayanliu/aggbug/7924.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/nayanliu/" target="_blank">楚客</a> 2005-07-18 17:23 <a href="http://www.blogjava.net/nayanliu/articles/7924.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>JS部分通用函数</title><link>http://www.blogjava.net/nayanliu/articles/5913.html</link><dc:creator>楚客</dc:creator><author>楚客</author><pubDate>Sat, 11 Jun 2005 09:07:00 GMT</pubDate><guid>http://www.blogjava.net/nayanliu/articles/5913.html</guid><wfw:comment>http://www.blogjava.net/nayanliu/comments/5913.html</wfw:comment><comments>http://www.blogjava.net/nayanliu/articles/5913.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/nayanliu/comments/commentRss/5913.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/nayanliu/services/trackbacks/5913.html</trackback:ping><description><![CDATA[<P><FONT size=1>JavaScript在WEB编程中能起到很大的作用，将一些常用的功能写成JavaScript类库。</FONT></P>
<P><FONT size=1>将下面代码保存为Common.js</FONT></P>
<P><FONT size=1>类库功能：</FONT></P>
<P><FONT size=1>1.Trim(str)－－去除字符串两边的空格</FONT></P>
<P><FONT size=1>2.XMLEncode(str)－－对字符串进行XML编码</FONT></P>
<P><FONT size=1>3.ShowLabel(str,str)－－鼠标提示功能（显示字符，提示字符）</FONT></P>
<P><FONT size=1>可以设置显示的提示的文字的字体、颜色、大小以及提示的背景颜色、边框等</FONT></P>
<P><FONT size=1>4.IsEmpty(obj)－－验证输入框是否为空</FONT></P>
<P><FONT size=1>5.IsInt(objStr,sign,zero)－－验证是否为整数，正整数，负整数，以及是否包括零</FONT></P>
<P><FONT size=1>6.IsFloat(objStr,sign,zero)－－验证是否为浮点数，正浮点，负浮点，以及是否包括零</FONT></P>
<P><FONT size=1>7.IsEnLetter(objStr,size)－－验证是否为26个字母，大写小</FONT></P>
<P><BR><FONT size=1>源代码如下：</FONT></P>
<P><FONT size=1>/*</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 名字：Common.js</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 功能：通用JavaScript脚本函数库</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 包括：</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.Trim(str)－－去除字符串两边的空格</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.XMLEncode(str)－－对字符串进行XML编码</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3.ShowLabel(str,str)－－鼠标提示功能（显示字符，提示字符）</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.IsEmpty(obj)－－验证输入框是否为空</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5.IsInt(objStr,sign,zero)－－验证是否为整数</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6.IsFloat(objStr,sign,zero)－－验证是否为浮点数</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7.IsEnLetter(objStr,size)－－验证是否为26个字母</FONT></P>
<P><FONT size=1></FONT>&nbsp;</P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; 作者：申旺</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; 日期：2004/04/14</FONT></P>
<P><FONT size=1>*/</FONT></P>
<P><FONT size=1></FONT>&nbsp;</P>
<P><FONT size=1>/*</FONT></P>
<P><FONT size=1>==================================================================</FONT></P>
<P><FONT size=1>字符串操作</FONT></P>
<P><FONT size=1>Trim(string):去除字符串两边的空格</FONT></P>
<P><FONT size=1>==================================================================</FONT></P>
<P><FONT size=1>*/</FONT></P>
<P><FONT size=1></FONT>&nbsp;</P>
<P><FONT size=1>/*</FONT></P>
<P><FONT size=1>==================================================================</FONT></P>
<P><FONT size=1>LTrim(string):去除左边的空格</FONT></P>
<P><FONT size=1>==================================================================</FONT></P>
<P><FONT size=1>*/</FONT></P>
<P><FONT size=1>function LTrim(str)</FONT></P>
<P><FONT size=1>{</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; var whitespace = new String(" \t\n\r");</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; var s = new String(str);</FONT></P>
<P><FONT size=1>&nbsp;&nbsp; </FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; if (whitespace.indexOf(s.charAt(0)) != -1)</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; {</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var j=0, i = s.length;</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; while (j &lt; i &amp;&amp; whitespace.indexOf(s.charAt(j)) != -1)</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; j++;</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; s = s.substring(j, i);</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; }</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; return s;</FONT></P>
<P><FONT size=1>}</FONT></P>
<P><FONT size=1></FONT>&nbsp;</P>
<P><FONT size=1>/*</FONT></P>
<P><FONT size=1>==================================================================</FONT></P>
<P><FONT size=1>RTrim(string):去除右边的空格</FONT></P>
<P><FONT size=1>==================================================================</FONT></P>
<P><FONT size=1>*/</FONT></P>
<P><FONT size=1>function RTrim(str)</FONT></P>
<P><FONT size=1>{</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; var whitespace = new String(" \t\n\r");</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; var s = new String(str);</FONT></P>
<P><FONT size=1></FONT>&nbsp;</P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; if (whitespace.indexOf(s.charAt(s.length-1)) != -1)</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; {</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var i = s.length - 1;</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; while (i &gt;= 0 &amp;&amp; whitespace.indexOf(s.charAt(i)) != -1)</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; i--;</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; s = s.substring(0, i+1);</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; }</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; return s;</FONT></P>
<P><FONT size=1>}</FONT></P>
<P><FONT size=1></FONT>&nbsp;</P>
<P><FONT size=1>/*</FONT></P>
<P><FONT size=1>==================================================================</FONT></P>
<P><FONT size=1>Trim(string):去除前后空格</FONT></P>
<P><FONT size=1>==================================================================</FONT></P>
<P><FONT size=1>*/</FONT></P>
<P><FONT size=1>function Trim(str)</FONT></P>
<P><FONT size=1>{</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; return RTrim(LTrim(str));</FONT></P>
<P><FONT size=1>}</FONT></P>
<P><FONT size=1></FONT>&nbsp;</P>
<P><FONT size=1></FONT>&nbsp;</P>
<P><FONT size=1></FONT>&nbsp;</P>
<P><FONT size=1>/*</FONT></P>
<P><FONT size=1>================================================================================</FONT></P>
<P><FONT size=1>XMLEncode(string):对字符串进行XML编码</FONT></P>
<P><FONT size=1>================================================================================</FONT></P>
<P><FONT size=1>*/</FONT></P>
<P><FONT size=1>function XMLEncode(str)</FONT></P>
<P><FONT size=1>{</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; str=Trim(str);</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; str=str.replace("&amp;","&amp;amp;");</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; str=str.replace("&lt;","&amp;lt;");</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; str=str.replace("&gt;","&amp;gt;");</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; str=str.replace("'","&amp;apos;");</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; str=str.replace("\"","&amp;quot;");</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return str;</FONT></P>
<P><FONT size=1>}</FONT></P>
<P><FONT size=1></FONT>&nbsp;</P>
<P><FONT size=1>/*</FONT></P>
<P><FONT size=1>================================================================================</FONT></P>
<P><FONT size=1>验证类函数</FONT></P>
<P><FONT size=1>================================================================================</FONT></P>
<P><FONT size=1>*/</FONT></P>
<P><FONT size=1></FONT>&nbsp;</P>
<P><FONT size=1>function IsEmpty(obj)</FONT></P>
<P><FONT size=1>{</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; obj=document.getElementsByName(obj).item(0);</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; if(Trim(obj.value)=="")</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; {</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; alert("字段不能为空。");&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(obj.disabled==false &amp;&amp; obj.readOnly==false)</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; obj.focus();</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; }</FONT></P>
<P><FONT size=1>}</FONT></P>
<P><FONT size=1></FONT>&nbsp;</P>
<P><FONT size=1>/*</FONT></P>
<P><FONT size=1>IsInt(string,string,int or string):(测试字符串,+ or - or empty,empty or 0)</FONT></P>
<P><FONT size=1>功能：判断是否为整数、正整数、负整数、正整数+0、负整数+0</FONT></P>
<P><FONT size=1>*/</FONT></P>
<P><FONT size=1>function IsInt(objStr,sign,zero)</FONT></P>
<P><FONT size=1>{</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; var reg;&nbsp;&nbsp; </FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; var bolzero;&nbsp;&nbsp; </FONT></P>
<P><FONT size=1>&nbsp;&nbsp; </FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; if(Trim(objStr)=="")</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; {</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return false;</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; }</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; else</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; {</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; objStr=objStr.toString();</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp; </FONT></P>
<P><FONT size=1>&nbsp;&nbsp; </FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; if((sign==null)||(Trim(sign)==""))</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; {</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sign="+-";</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; }</FONT></P>
<P><FONT size=1>&nbsp;&nbsp; </FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; if((zero==null)||(Trim(zero)==""))</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; {</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bolzero=false;</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; }</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; else</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; {</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; zero=zero.toString();</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(zero=="0")</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bolzero=true;</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; alert("检查是否包含0参数，只可为(空、0)");</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; }</FONT></P>
<P><FONT size=1>&nbsp;&nbsp; </FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; switch(sign)</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; {</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case "+-":</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //整数</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; reg=/(^-?|^\+?)\d+$/;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case "+":</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(!bolzero)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //正整数</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; reg=/^\+?[0-9]*[1-9][0-9]*$/;</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //正整数+0</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //reg=/^\+?\d+$/;</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; reg=/^\+?[0-9]*[0-9][0-9]*$/;</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case "-":</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(!bolzero)</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //负整数</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; reg=/^-[0-9]*[1-9][0-9]*$/;</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //负整数+0</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //reg=/^-\d+$/;</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; reg=/^-[0-9]*[0-9][0-9]*$/;</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; default:</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; alert("检查符号参数，只可为(空、+、-)");</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return false;</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; }</FONT></P>
<P><FONT size=1>&nbsp;&nbsp; </FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; var r=objStr.match(reg);</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; if(r==null)</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; {</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return false;</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; }</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; else</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return true;&nbsp;&nbsp;&nbsp; </FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; }</FONT></P>
<P><FONT size=1>}</FONT></P>
<P><FONT size=1></FONT>&nbsp;</P>
<P><FONT size=1>/*</FONT></P>
<P><FONT size=1>IsFloat(string,string,int or string):(测试字符串,+ or - or empty,empty or 0)</FONT></P>
<P><FONT size=1>功能：判断是否为浮点数、正浮点数、负浮点数、正浮点数+0、负浮点数+0</FONT></P>
<P><FONT size=1>*/</FONT></P>
<P><FONT size=1>function IsFloat(objStr,sign,zero)</FONT></P>
<P><FONT size=1>{</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; var reg;&nbsp;&nbsp; </FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; var bolzero;&nbsp;&nbsp; </FONT></P>
<P><FONT size=1>&nbsp;&nbsp; </FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; if(Trim(objStr)=="")</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; {</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return false;</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; }</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; else</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; {</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; objStr=objStr.toString();</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp; </FONT></P>
<P><FONT size=1>&nbsp;&nbsp; </FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; if((sign==null)||(Trim(sign)==""))</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; {</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sign="+-";</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; }</FONT></P>
<P><FONT size=1>&nbsp;&nbsp; </FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; if((zero==null)||(Trim(zero)==""))</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; {</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bolzero=false;</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; }</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; else</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; {</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; zero=zero.toString();</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(zero=="0")</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bolzero=true;</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; alert("检查是否包含0参数，只可为(空、0)");</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; }</FONT></P>
<P><FONT size=1>&nbsp;&nbsp; </FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; switch(sign)</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; {</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case "+-":</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //浮点数</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; reg=/^((-?|\+?)\d+)(\.\d+)?$/;</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case "+":</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(!bolzero)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //正浮点数</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; reg=/^\+?(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*))$/;</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //正浮点数+0</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; reg=/^\+?\d+(\.\d+)?$/;</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case "-":</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(!bolzero)</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //负浮点数</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; reg=/^-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*))$/;</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //负浮点数+0</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; reg=/^((-\d+(\.\d+)?)|(0+(\.0+)?))$/;</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; default:</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; alert("检查符号参数，只可为(空、+、-)");</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return false;</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; }</FONT></P>
<P><FONT size=1>&nbsp;&nbsp; </FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; var r=objStr.match(reg);</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; if(r==null)</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; {</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return false;</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; }</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; else</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return true;&nbsp;&nbsp;&nbsp; </FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; }</FONT></P>
<P><FONT size=1>}</FONT></P>
<P><FONT size=1></FONT>&nbsp;</P><img src ="http://www.blogjava.net/nayanliu/aggbug/5913.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/nayanliu/" target="_blank">楚客</a> 2005-06-11 17:07 <a href="http://www.blogjava.net/nayanliu/articles/5913.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>利用客户端js实现汉字简体繁体转换</title><link>http://www.blogjava.net/nayanliu/articles/5912.html</link><dc:creator>楚客</dc:creator><author>楚客</author><pubDate>Sat, 11 Jun 2005 08:58:00 GMT</pubDate><guid>http://www.blogjava.net/nayanliu/articles/5912.html</guid><wfw:comment>http://www.blogjava.net/nayanliu/comments/5912.html</wfw:comment><comments>http://www.blogjava.net/nayanliu/articles/5912.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/nayanliu/comments/commentRss/5912.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/nayanliu/services/trackbacks/5912.html</trackback:ping><description><![CDATA[<H3>汉字简体<U><B><FONT color=#ff0000>繁体</FONT></B></U><U><B><FONT color=#ff0000>转换</FONT></B></U></H3><INPUT onclick=h1.value=0;convert() type=radio CHECKED value=0 name=r1>简体 <INPUT onclick=h1.value=1;convert() type=radio value=1 name=r1><U><B><FONT color=#ff0000>繁体</FONT></B></U> <BR><TEXTAREA id=txt rows=10 cols=50 value="">PHP5研究室欢迎各位来!</TEXTAREA><BR><INPUT type=hidden value=0 name=h1> <IMG height=100 width=0> 
<HR>
<FONT size=1>以下是代码
<SCRIPT> 
//*************Copyright 2003***************** 
// This script is written by neweroica, 2003-1-6 
//****************************************** 
function charPYStr(){ 
return '啊阿埃挨哎唉哀皑癌蔼矮艾碍爱隘鞍氨安俺按暗岸胺案肮昂盎凹敖熬翱袄傲奥懊澳芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸白柏百摆佰败拜稗斑班搬扳般颁板版扮拌伴瓣半办绊邦帮梆榜膀绑棒磅蚌镑傍谤苞胞包褒剥薄雹保堡饱宝抱报暴豹鲍爆杯碑悲卑北辈背贝钡倍狈备惫焙被奔苯本笨崩绷甭泵蹦迸逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛鞭边编贬扁便变卞辨辩辫遍标彪膘表鳖憋别瘪彬斌濒滨宾摈兵冰柄丙秉饼炳病并玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳捕卜哺补埠不布步簿部怖擦猜裁材才财睬踩采彩菜蔡餐参蚕残惭惨灿苍舱仓沧藏操糙槽曹草厕策侧册测层蹭插叉茬茶查碴搽察岔差诧拆柴豺搀掺蝉馋谗缠铲产阐颤昌猖场尝常长偿肠厂敞畅唱倡超抄钞朝嘲潮巢吵炒车扯撤掣彻澈郴臣辰尘晨忱沉陈趁衬撑称城橙成呈乘程惩澄诚承逞骋秤吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽充冲虫崇宠抽酬畴踌稠愁筹仇绸瞅丑臭初出橱厨躇锄雏滁除楚础储矗搐触处揣川穿椽传船喘串疮窗幢床闯创吹炊捶锤垂春椿醇唇淳纯蠢戳绰疵茨磁雌辞慈瓷词此刺赐次聪葱囱匆从丛凑粗醋簇促蹿篡窜摧崔催脆瘁粹淬翠村存寸磋撮搓措挫错搭达答瘩打大呆歹傣戴带殆代贷袋待逮怠耽担丹单郸掸胆旦氮但惮淡诞弹蛋当挡党荡档刀捣蹈倒岛祷导到稻悼道盗德得的蹬灯登等瞪凳邓堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔颠掂滇碘点典靛垫电佃甸店惦奠淀殿碉叼雕凋刁掉吊钓调跌爹碟蝶迭谍叠丁盯叮钉顶鼎锭定订丢东冬董懂动栋侗恫冻洞兜抖斗陡豆逗痘都督毒犊独读堵睹赌杜镀肚度渡妒端短锻段断缎堆兑队对墩吨蹲敦顿囤钝盾遁掇哆多夺垛躲朵跺舵剁惰堕蛾峨鹅俄额讹娥恶厄扼遏鄂饿恩而儿耳尔饵洱二贰发罚筏伐乏阀法珐藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛坊芳方肪房防妨仿访纺放菲非啡飞肥匪诽吠肺废沸费芬酚吩氛分纷坟焚汾粉奋份忿愤粪丰封枫蜂峰锋风疯烽逢冯缝讽奉凤佛否夫敷肤孵扶拂辐幅氟符伏俘服浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐噶嘎该改概钙盖溉干甘杆柑竿肝赶感秆敢赣冈刚钢缸肛纲岗港杠篙皋高膏羔糕搞镐稿告哥歌搁戈鸽胳疙割革葛格蛤阁隔铬个各给根跟耕更庚羹埂耿梗工攻功恭龚供躬公宫弓巩汞拱贡共钩勾沟苟狗垢构购够辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇刮瓜剐寡挂褂乖拐怪棺关官冠观管馆罐惯灌贯光广逛瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽辊滚棍锅郭国果裹过哈骸孩海氦亥害骇酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉夯杭航壕嚎豪毫郝好耗号浩呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺嘿黑痕很狠恨哼亨横衡恒轰哄烘虹鸿洪宏弘红喉侯猴吼厚候后呼乎忽瑚壶葫胡蝴狐糊湖弧虎唬护互沪户花哗华猾滑画划化话槐徊怀淮坏欢环桓还缓换患唤痪豢焕涣宦幻荒慌黄磺蝗簧皇凰惶煌晃幌恍谎灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘荤昏婚魂浑混豁活伙火获或惑霍货祸击圾基机畸稽积箕肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际继纪嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁歼监坚尖笺间煎兼肩艰奸缄茧检柬碱硷拣捡简俭剪减荐槛鉴践贱见键箭件健舰剑饯渐溅涧建僵姜将浆江疆蒋桨奖讲匠酱降蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫窖揭接皆秸街阶截劫节茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净炯窘揪究纠玖韭久灸九酒厩救旧臼舅咎就疚鞠拘狙疽居驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧捐鹃娟倦眷卷绢撅攫抉掘倔爵桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸尽劲荆兢觉决诀绝均菌钧军君峻俊竣浚郡骏喀咖卡咯开揩楷凯慨刊堪勘坎砍看康慷糠扛抗亢炕考拷烤靠坷苛柯棵磕颗科壳咳可渴克刻客课肯啃垦恳坑吭空恐孔控抠口扣寇枯哭窟苦酷库裤夸垮挎跨胯块筷侩快宽款匡筐狂框矿眶旷况亏盔岿窥葵奎魁傀馈愧溃坤昆捆困括扩廓阔垃拉喇蜡腊辣啦莱来赖蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥琅榔狼廊郎朗浪捞劳牢老佬姥酪烙涝勒乐雷镭蕾磊累儡垒擂肋类泪棱楞冷厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利傈例俐痢立粒沥隶力璃哩俩联莲连镰廉怜涟帘敛脸链恋炼练粮凉梁粱良两辆量晾亮谅撩聊僚疗燎寥辽潦了撂镣廖料列裂烈劣猎琳林磷霖临邻鳞淋凛赁吝拎玲菱零龄铃伶羚凌灵陵岭领另令溜琉榴硫馏留刘瘤流柳六龙聋咙笼窿隆垄拢陇楼娄搂篓漏陋芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮驴吕铝侣旅履屡缕虑氯律率滤绿峦挛孪滦卵乱掠略抡轮伦仑沦纶论萝螺罗逻锣箩骡裸落洛骆络妈麻玛码蚂马骂嘛吗埋买麦卖迈脉瞒馒蛮满蔓曼慢漫谩芒茫盲氓忙莽猫茅锚毛矛铆卯茂冒帽貌贸么玫枚梅酶霉煤没眉媒镁每美昧寐妹媚门闷们萌蒙檬盟锰猛梦孟眯醚靡糜迷谜弥米秘觅泌蜜密幂棉眠绵冕免勉娩缅面苗描瞄藐秒渺庙妙蔑灭民抿皿敏悯闽明螟鸣铭名命谬摸摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谋牟某拇牡亩姆母墓暮幕募慕木目睦牧穆拿哪呐钠那娜纳氖乃奶耐奈南男难囊挠脑恼闹淖呢馁内嫩能妮霓倪泥尼拟你匿腻逆溺蔫拈年碾撵捻念娘酿鸟尿捏聂孽啮镊镍涅您柠狞凝宁拧泞牛扭钮纽脓浓农弄奴努怒女暖虐疟挪懦糯诺哦欧鸥殴藕呕偶沤啪趴爬帕怕琶拍排牌徘湃派攀潘盘磐盼畔判叛乓庞旁耪胖抛咆刨炮袍跑泡呸胚培裴赔陪配佩沛喷盆砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰坯砒霹批披劈琵毗啤脾疲皮匹痞僻屁譬篇偏片骗飘漂瓢票撇瞥拼频贫品聘乒坪苹萍平凭瓶评屏坡泼颇婆破魄迫粕剖扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫掐洽牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉枪呛腔羌墙蔷强抢橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍切茄且怯窃钦侵亲秦琴勤芹擒禽寝沁青轻氢倾卿清擎晴氰情顷请庆琼穷秋丘邱球求囚酋泅趋区蛆曲躯屈驱渠取娶龋趣去圈颧权醛泉全痊拳犬券劝缺炔瘸却鹊榷确雀裙群然燃冉染瓤壤攘嚷让饶扰绕惹热壬仁人忍韧任认刃妊纫扔仍日戎茸蓉荣融熔溶容绒冗揉柔肉茹蠕儒孺如辱乳汝入褥软阮蕊瑞锐闰润若弱撒洒萨腮鳃塞赛三叁伞散桑嗓丧搔骚扫嫂瑟色涩森僧莎砂杀刹沙纱傻啥煞筛晒珊苫杉山删煽衫闪陕擅赡膳善汕扇缮墒伤商赏晌上尚裳梢捎稍烧芍勺韶少哨邵绍奢赊蛇舌舍赦摄射慑涉社设砷申呻伸身深娠绅神沈审婶甚肾慎渗声生甥牲升绳省盛剩胜圣师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试收手首守寿授售受瘦兽蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱恕刷耍摔衰甩帅栓拴霜双爽谁水睡税吮瞬顺舜说硕朔烁斯撕嘶思私司丝死肆寺嗣四伺似饲巳松耸怂颂送宋讼诵搜艘擞嗽苏酥俗素速粟僳塑溯宿诉肃酸蒜算虽隋随绥髓碎岁穗遂隧祟孙损笋蓑梭唆缩琐索锁所塌他它她塔獭挞蹋踏胎苔抬台泰酞太态汰坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭汤塘搪堂棠膛唐糖倘躺淌趟烫掏涛滔绦萄桃逃淘陶讨套特藤腾疼誊梯剔踢锑提题蹄啼体替嚏惕涕剃屉天添填田甜恬舔腆挑条迢眺跳贴铁帖厅听烃汀廷停亭庭挺艇通桐酮瞳同铜彤童桶捅筒统痛偷投头透凸秃突图徒途涂屠土吐兔湍团推颓腿蜕褪退吞屯臀拖托脱鸵陀驮驼椭妥拓唾挖哇蛙洼娃瓦袜歪外豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕汪王亡枉网往旺望忘妄威巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫瘟温蚊文闻纹吻稳紊问嗡翁瓮挝蜗涡窝我斡卧握沃巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误昔熙析西硒矽晰嘻吸锡牺稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细瞎虾匣霞辖暇峡侠狭下厦夏吓掀锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象萧硝霄削哮嚣销消宵淆晓小孝校肖啸笑效楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑薪芯锌欣辛新忻心信衅星腥猩惺兴刑型形邢行醒幸杏性姓兄凶胸匈汹雄熊休修羞朽嗅锈秀袖绣墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续轩喧宣悬旋玄选癣眩绚靴薛学穴雪血勋熏循旬询寻驯巡殉汛训讯逊迅压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾邀腰妖瑶摇尧遥窑谣姚咬舀药要耀椰噎耶爷野冶也页掖业叶曳腋夜液一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎茵荫因殷音阴姻吟银淫寅饮尹引隐印英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映哟拥佣臃痈庸雍踊蛹咏泳涌永恿勇用幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉浴寓裕预豫驭鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院曰约越跃钥岳粤月悦阅耘云郧匀陨允运蕴酝晕韵孕匝砸杂栽哉灾宰载再在咱攒暂赞赃脏葬遭糟凿藻枣早澡蚤躁噪造皂灶燥责择则泽贼怎增憎曾赠扎喳渣札轧铡闸眨栅榨咋乍炸诈摘斋宅窄债寨瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽樟章彰漳张掌涨杖丈帐账仗胀瘴障招昭找沼赵照罩兆肇召遮折哲蛰辙者锗蔗这浙珍斟真甄砧臻贞针侦枕疹诊震振镇阵蒸挣睁征狰争怔整拯正政帧症郑证芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒中盅忠钟衷终种肿重仲众舟周州洲诌粥轴肘帚咒皱宙昼骤珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑住注祝驻抓爪拽专砖转撰赚篆桩庄装妆撞壮状椎锥追赘坠缀谆准捉拙卓桌琢茁酌啄着灼浊兹咨资姿滋淄孜紫仔籽滓子自渍字鬃棕踪宗综总纵邹走奏揍租足卒族祖诅阻组钻纂嘴醉最罪尊遵昨左佐柞做作坐座'; 
} 

function ftPYStr(){ 
return '啊阿埃挨哎唉哀皚癌藹矮艾礙愛隘鞍氨安俺按暗岸胺案肮昂盎凹敖熬翺襖傲奧懊澳芭捌扒叭吧笆八疤巴拔跋靶把耙壩霸罷爸白柏百擺佰敗拜稗斑班搬扳般頒板版扮拌伴瓣半辦絆邦幫梆榜膀綁棒磅蚌鎊傍謗苞胞包褒剝薄雹保堡飽寶抱報暴豹鮑爆杯碑悲卑北輩背貝鋇倍狽備憊焙被奔苯本笨崩繃甭泵蹦迸逼鼻比鄙筆彼碧蓖蔽畢斃毖幣庇痹閉敝弊必辟壁臂避陛鞭邊編貶扁便變卞辨辯辮遍標彪膘表鼈憋別癟彬斌瀕濱賓擯兵冰柄丙秉餅炳病並玻菠播撥缽波博勃搏鉑箔伯帛舶脖膊渤泊駁捕蔔哺補埠不布步簿部怖擦猜裁材才財睬踩采彩菜蔡餐參蠶殘慚慘燦蒼艙倉滄藏操糙槽曹草廁策側冊測層蹭插叉茬茶查碴搽察岔差詫拆柴豺攙摻蟬饞讒纏鏟産闡顫昌猖場嘗常長償腸廠敞暢唱倡超抄鈔朝嘲潮巢吵炒車扯撤掣徹澈郴臣辰塵晨忱沈陳趁襯撐稱城橙成呈乘程懲澄誠承逞騁秤吃癡持匙池遲弛馳恥齒侈尺赤翅斥熾充沖蟲崇寵抽酬疇躊稠愁籌仇綢瞅醜臭初出櫥廚躇鋤雛滁除楚礎儲矗搐觸處揣川穿椽傳船喘串瘡窗幢床闖創吹炊捶錘垂春椿醇唇淳純蠢戳綽疵茨磁雌辭慈瓷詞此刺賜次聰蔥囪匆從叢湊粗醋簇促躥篡竄摧崔催脆瘁粹淬翠村存寸磋撮搓措挫錯搭達答瘩打大呆歹傣戴帶殆代貸袋待逮怠耽擔丹單鄲撣膽旦氮但憚淡誕彈蛋當擋黨蕩檔刀搗蹈倒島禱導到稻悼道盜德得的蹬燈登等瞪凳鄧堤低滴迪敵笛狄滌翟嫡抵底地蒂第帝弟遞締顛掂滇碘點典靛墊電佃甸店惦奠澱殿碉叼雕凋刁掉吊釣調跌爹碟蝶叠諜疊丁盯叮釘頂鼎錠定訂丟東冬董懂動棟侗恫凍洞兜抖鬥陡豆逗痘都督毒犢獨讀堵睹賭杜鍍肚度渡妒端短鍛段斷緞堆兌隊對墩噸蹲敦頓囤鈍盾遁掇哆多奪垛躲朵跺舵剁惰墮蛾峨鵝俄額訛娥惡厄扼遏鄂餓恩而兒耳爾餌洱二貳發罰筏伐乏閥法琺藩帆番翻樊礬釩繁凡煩反返範販犯飯泛坊芳方肪房防妨仿訪紡放菲非啡飛肥匪誹吠肺廢沸費芬酚吩氛分紛墳焚汾粉奮份忿憤糞豐封楓蜂峰鋒風瘋烽逢馮縫諷奉鳳佛否夫敷膚孵扶拂輻幅氟符伏俘服浮涪福袱弗甫撫輔俯釜斧脯腑府腐赴副覆賦複傅付阜父腹負富訃附婦縛咐噶嘎該改概鈣蓋溉幹甘杆柑竿肝趕感稈敢贛岡剛鋼缸肛綱崗港杠篙臯高膏羔糕搞鎬稿告哥歌擱戈鴿胳疙割革葛格蛤閣隔鉻個各給根跟耕更庚羹埂耿梗工攻功恭龔供躬公宮弓鞏汞拱貢共鈎勾溝苟狗垢構購夠辜菇咕箍估沽孤姑鼓古蠱骨谷股故顧固雇刮瓜剮寡挂褂乖拐怪棺關官冠觀管館罐慣灌貫光廣逛瑰規圭矽歸龜閨軌鬼詭癸桂櫃跪貴劊輥滾棍鍋郭國果裹過哈骸孩海氦亥害駭酣憨邯韓含涵寒函喊罕翰撼捍旱憾悍焊汗漢夯杭航壕嚎豪毫郝好耗號浩呵喝荷菏核禾和何合盒貉閡河涸赫褐鶴賀嘿黑痕很狠恨哼亨橫衡恒轟哄烘虹鴻洪宏弘紅喉侯猴吼厚候後呼乎忽瑚壺葫胡蝴狐糊湖弧虎唬護互滬戶花嘩華猾滑畫劃化話槐徊懷淮壞歡環桓還緩換患喚瘓豢煥渙宦幻荒慌黃磺蝗簧皇凰惶煌晃幌恍謊灰揮輝徽恢蛔回毀悔慧卉惠晦賄穢會燴彙諱誨繪葷昏婚魂渾混豁活夥火獲或惑霍貨禍擊圾基機畸稽積箕肌饑迹激譏雞姬績緝吉極棘輯籍集及急疾汲即嫉級擠幾脊己薊技冀季伎祭劑悸濟寄寂計記既忌際繼紀嘉枷夾佳家加莢頰賈甲鉀假稼價架駕嫁殲監堅尖箋間煎兼肩艱奸緘繭檢柬堿鹼揀撿簡儉剪減薦檻鑒踐賤見鍵箭件健艦劍餞漸濺澗建僵姜將漿江疆蔣槳獎講匠醬降蕉椒礁焦膠交郊澆驕嬌嚼攪鉸矯僥腳狡角餃繳絞剿教酵轎較叫窖揭接皆稭街階截劫節莖睛晶鯨京驚精粳經井警景頸靜境敬鏡徑痙靖竟競淨炯窘揪究糾玖韭久灸九酒廄救舊臼舅咎就疚鞠拘狙疽居駒菊局咀矩舉沮聚拒據巨具距踞鋸俱句懼炬劇捐鵑娟倦眷卷絹撅攫抉掘倔爵桔傑捷睫竭潔結解姐戒藉芥界借介疥誡屆巾筋斤金今津襟緊錦僅謹進靳晉禁近燼浸盡勁荊兢覺決訣絕均菌鈞軍君峻俊竣浚郡駿喀咖卡咯開揩楷凱慨刊堪勘坎砍看康慷糠扛抗亢炕考拷烤靠坷苛柯棵磕顆科殼咳可渴克刻客課肯啃墾懇坑吭空恐孔控摳口扣寇枯哭窟苦酷庫褲誇垮挎跨胯塊筷儈快寬款匡筐狂框礦眶曠況虧盔巋窺葵奎魁傀饋愧潰坤昆捆困括擴廓闊垃拉喇蠟臘辣啦萊來賴藍婪欄攔籃闌蘭瀾讕攬覽懶纜爛濫琅榔狼廊郎朗浪撈勞牢老佬姥酪烙澇勒樂雷鐳蕾磊累儡壘擂肋類淚棱楞冷厘梨犁黎籬狸離漓理李裏鯉禮莉荔吏栗麗厲勵礫曆利傈例俐痢立粒瀝隸力璃哩倆聯蓮連鐮廉憐漣簾斂臉鏈戀煉練糧涼梁粱良兩輛量晾亮諒撩聊僚療燎寥遼潦了撂鐐廖料列裂烈劣獵琳林磷霖臨鄰鱗淋凜賃吝拎玲菱零齡鈴伶羚淩靈陵嶺領另令溜琉榴硫餾留劉瘤流柳六龍聾嚨籠窿隆壟攏隴樓婁摟簍漏陋蘆盧顱廬爐擄鹵虜魯麓碌露路賂鹿潞祿錄陸戮驢呂鋁侶旅履屢縷慮氯律率濾綠巒攣孿灤卵亂掠略掄輪倫侖淪綸論蘿螺羅邏鑼籮騾裸落洛駱絡媽麻瑪碼螞馬罵嘛嗎埋買麥賣邁脈瞞饅蠻滿蔓曼慢漫謾芒茫盲氓忙莽貓茅錨毛矛鉚卯茂冒帽貌貿麽玫枚梅酶黴煤沒眉媒鎂每美昧寐妹媚門悶們萌蒙檬盟錳猛夢孟眯醚靡糜迷謎彌米秘覓泌蜜密冪棉眠綿冕免勉娩緬面苗描瞄藐秒渺廟妙蔑滅民抿皿敏憫閩明螟鳴銘名命謬摸摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌謀牟某拇牡畝姆母墓暮幕募慕木目睦牧穆拿哪呐鈉那娜納氖乃奶耐奈南男難囊撓腦惱鬧淖呢餒內嫩能妮霓倪泥尼擬你匿膩逆溺蔫拈年碾攆撚念娘釀鳥尿捏聶孽齧鑷鎳涅您檸獰凝甯擰濘牛扭鈕紐膿濃農弄奴努怒女暖虐瘧挪懦糯諾哦歐鷗毆藕嘔偶漚啪趴爬帕怕琶拍排牌徘湃派攀潘盤磐盼畔判叛乓龐旁耪胖抛咆刨炮袍跑泡呸胚培裴賠陪配佩沛噴盆砰抨烹澎彭蓬棚硼篷膨朋鵬捧碰坯砒霹批披劈琵毗啤脾疲皮匹痞僻屁譬篇偏片騙飄漂瓢票撇瞥拼頻貧品聘乒坪蘋萍平憑瓶評屏坡潑頗婆破魄迫粕剖撲鋪仆莆葡菩蒲埔樸圃普浦譜曝瀑期欺棲戚妻七淒漆柒沏其棋奇歧畦崎臍齊旗祈祁騎起豈乞企啓契砌器氣迄棄汽泣訖掐洽牽扡釺鉛千遷簽仟謙乾黔錢鉗前潛遣淺譴塹嵌欠歉槍嗆腔羌牆薔強搶橇鍬敲悄橋瞧喬僑巧鞘撬翹峭俏竅切茄且怯竊欽侵親秦琴勤芹擒禽寢沁青輕氫傾卿清擎晴氰情頃請慶瓊窮秋丘邱球求囚酋泅趨區蛆曲軀屈驅渠取娶齲趣去圈顴權醛泉全痊拳犬券勸缺炔瘸卻鵲榷確雀裙群然燃冉染瓤壤攘嚷讓饒擾繞惹熱壬仁人忍韌任認刃妊紉扔仍日戎茸蓉榮融熔溶容絨冗揉柔肉茹蠕儒孺如辱乳汝入褥軟阮蕊瑞銳閏潤若弱撒灑薩腮鰓塞賽三三傘散桑嗓喪搔騷掃嫂瑟色澀森僧莎砂殺刹沙紗傻啥煞篩曬珊苫杉山刪煽衫閃陝擅贍膳善汕扇繕墒傷商賞晌上尚裳梢捎稍燒芍勺韶少哨邵紹奢賒蛇舌舍赦攝射懾涉社設砷申呻伸身深娠紳神沈審嬸甚腎慎滲聲生甥牲升繩省盛剩勝聖師失獅施濕詩屍虱十石拾時什食蝕實識史矢使屎駛始式示士世柿事拭誓逝勢是嗜噬適仕侍釋飾氏市恃室視試收手首守壽授售受瘦獸蔬樞梳殊抒輸叔舒淑疏書贖孰熟薯暑曙署蜀黍鼠屬術述樹束戍豎墅庶數漱恕刷耍摔衰甩帥栓拴霜雙爽誰水睡稅吮瞬順舜說碩朔爍斯撕嘶思私司絲死肆寺嗣四伺似飼巳松聳慫頌送宋訟誦搜艘擻嗽蘇酥俗素速粟僳塑溯宿訴肅酸蒜算雖隋隨綏髓碎歲穗遂隧祟孫損筍蓑梭唆縮瑣索鎖所塌他它她塔獺撻蹋踏胎苔擡台泰酞太態汰坍攤貪癱灘壇檀痰潭譚談坦毯袒碳探歎炭湯塘搪堂棠膛唐糖倘躺淌趟燙掏濤滔縧萄桃逃淘陶討套特藤騰疼謄梯剔踢銻提題蹄啼體替嚏惕涕剃屜天添填田甜恬舔腆挑條迢眺跳貼鐵帖廳聽烴汀廷停亭庭挺艇通桐酮瞳同銅彤童桶捅筒統痛偷投頭透凸禿突圖徒途塗屠土吐兔湍團推頹腿蛻褪退吞屯臀拖托脫鴕陀馱駝橢妥拓唾挖哇蛙窪娃瓦襪歪外豌彎灣玩頑丸烷完碗挽晚皖惋宛婉萬腕汪王亡枉網往旺望忘妄威巍微危韋違桅圍唯惟爲濰維葦萎委偉僞尾緯未蔚味畏胃喂魏位渭謂尉慰衛瘟溫蚊文聞紋吻穩紊問嗡翁甕撾蝸渦窩我斡臥握沃巫嗚鎢烏汙誣屋無蕪梧吾吳毋武五捂午舞伍侮塢戊霧晤物勿務悟誤昔熙析西硒矽晰嘻吸錫犧稀息希悉膝夕惜熄烯溪汐犀檄襲席習媳喜銑洗系隙戲細瞎蝦匣霞轄暇峽俠狹下廈夏嚇掀鍁先仙鮮纖鹹賢銜舷閑涎弦嫌顯險現獻縣腺餡羨憲陷限線相廂鑲香箱襄湘鄉翔祥詳想響享項巷橡像向象蕭硝霄削哮囂銷消宵淆曉小孝校肖嘯笑效楔些歇蠍鞋協挾攜邪斜脅諧寫械卸蟹懈泄瀉謝屑薪芯鋅欣辛新忻心信釁星腥猩惺興刑型形邢行醒幸杏性姓兄凶胸匈洶雄熊休修羞朽嗅鏽秀袖繡墟戌需虛噓須徐許蓄酗敘旭序畜恤絮婿緒續軒喧宣懸旋玄選癬眩絢靴薛學穴雪血勳熏循旬詢尋馴巡殉汛訓訊遜迅壓押鴉鴨呀丫芽牙蚜崖衙涯雅啞亞訝焉咽閹煙淹鹽嚴研蜒岩延言顔閻炎沿奄掩眼衍演豔堰燕厭硯雁唁彥焰宴諺驗殃央鴦秧楊揚佯瘍羊洋陽氧仰癢養樣漾邀腰妖瑤搖堯遙窯謠姚咬舀藥要耀椰噎耶爺野冶也頁掖業葉曳腋夜液一壹醫揖銥依伊衣頤夷遺移儀胰疑沂宜姨彜椅蟻倚已乙矣以藝抑易邑屹億役臆逸肄疫亦裔意毅憶義益溢詣議誼譯異翼翌繹茵蔭因殷音陰姻吟銀淫寅飲尹引隱印英櫻嬰鷹應纓瑩螢營熒蠅迎贏盈影穎硬映喲擁傭臃癰庸雍踴蛹詠泳湧永恿勇用幽優悠憂尤由郵鈾猶油遊酉有友右佑釉誘又幼迂淤于盂榆虞愚輿余俞逾魚愉渝漁隅予娛雨與嶼禹宇語羽玉域芋郁籲遇喻峪禦愈欲獄育譽浴寓裕預豫馭鴛淵冤元垣袁原援轅園員圓猿源緣遠苑願怨院曰約越躍鑰嶽粵月悅閱耘雲鄖勻隕允運蘊醞暈韻孕匝砸雜栽哉災宰載再在咱攢暫贊贓髒葬遭糟鑿藻棗早澡蚤躁噪造皂竈燥責擇則澤賊怎增憎曾贈紮喳渣劄軋鍘閘眨柵榨咋乍炸詐摘齋宅窄債寨瞻氈詹粘沾盞斬輾嶄展蘸棧占戰站湛綻樟章彰漳張掌漲杖丈帳賬仗脹瘴障招昭找沼趙照罩兆肇召遮折哲蟄轍者鍺蔗這浙珍斟真甄砧臻貞針偵枕疹診震振鎮陣蒸掙睜征猙爭怔整拯正政幀症鄭證芝枝支吱蜘知肢脂汁之織職直植殖執值侄址指止趾只旨紙志摯擲至致置幟峙制智秩稚質炙痔滯治窒中盅忠鍾衷終種腫重仲衆舟周州洲謅粥軸肘帚咒皺宙晝驟珠株蛛朱豬諸誅逐竹燭煮拄矚囑主著柱助蛀貯鑄築住注祝駐抓爪拽專磚轉撰賺篆樁莊裝妝撞壯狀椎錐追贅墜綴諄准捉拙卓桌琢茁酌啄著灼濁茲咨資姿滋淄孜紫仔籽滓子自漬字鬃棕蹤宗綜總縱鄒走奏揍租足卒族祖詛阻組鑽纂嘴醉最罪尊遵昨左佐柞做作坐座'; 
} 

function traditionalized(cc){ 
var str=''; 
for(var i=0;i<cc.length;i++){ 
if(charPYStr().indexOf(cc.charAt(i))!=-1) 
str+=ftPYStr().charAt(charPYStr().indexOf(cc.charAt(i))); 
else 
str+=cc.charAt(i); 
} 
return str; 
} 

function simplized(cc){ 
var str=''; 
for(var i=0;i<cc.length;i++){ 
if(ftPYStr().indexOf(cc.charAt(i))!=-1) 
str+=charPYStr().charAt(ftPYStr().indexOf(cc.charAt(i))); 
else 
str+=cc.charAt(i); 
} 
return str; 
} 

function convert(){ 
if(h1.value==0) 
txt.value=simplized(txt.value); 
else 
txt.value=traditionalized(txt.value); 
} 

</SCRIPT>
 &lt;HEAD&gt; <BR>&lt;TITLE&gt; New Document &lt;/TITLE&gt; <BR>&lt;/HEAD&gt; <BR><BR>&lt;BODY&gt; <BR>&lt;html&gt; <BR>&lt;head&gt; <BR>&lt;META http-equiv=Content-Type content="text/html; charset=GB2312"&gt; <BR>&lt;title&gt;汉字简体繁体转换&lt;/title&gt; <BR>&lt;/head&gt; <BR>&lt;body&gt; <BR>&lt;center&gt; <BR>&lt;h3&gt;汉字简体&lt;u&gt;&lt;b&gt;&lt;font color="#FF0000"&gt;繁体&lt;/font&gt;&lt;/b&gt;&lt;/u&gt;&lt;u&gt;&lt;b&gt;&lt;font color="#FF0000"&gt;转换&lt;/font&gt;&lt;/b&gt;&lt;/u&gt;（原创）&lt;/h3&gt; <BR>&lt;input type=radio name=r1 value=0 onclick="h1.value=0;convert()" checked&gt;简体 <BR>&lt;input type=radio name=r1 value=1 onclick="h1.value=1;convert()"&gt;&lt;u&gt;&lt;b&gt;&lt;font color="#FF0000"&gt;繁体&lt;/font&gt;&lt;/b&gt;&lt;/u&gt; <BR>&lt;br&gt; <BR>&lt;textarea id=txt rows=10 cols=50 value=''&gt;&lt;/textarea&gt;&lt;br&gt; <BR>&lt;input type=hidden name=h1 value=0&gt; <BR>&lt;img width=0 height=100&gt; <BR>&lt;hr&gt; <BR>Simple is beauty. <BR>&lt;script&gt; <BR>//*************Copyright 2003***************** <BR>// This script is written by neweroica, 2003-1-6 <BR>//****************************************** <BR>function charPYStr(){ <BR>return '啊阿埃挨哎唉哀皑癌蔼矮艾碍爱隘鞍氨安俺按暗岸胺案肮昂盎凹敖熬翱袄傲奥懊澳芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸白柏百摆佰败拜稗斑班搬扳般颁板版扮拌伴瓣半办绊邦帮梆榜膀绑棒磅蚌镑傍谤苞胞包褒剥薄雹保堡饱宝抱报暴豹鲍爆杯碑悲卑北辈背贝钡倍狈备惫焙被奔苯本笨崩绷甭泵蹦迸逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛鞭边编贬扁便变卞辨辩辫遍标彪膘表鳖憋别瘪彬斌濒滨宾摈兵冰柄丙秉饼炳病并玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳捕卜哺补埠不布步簿部怖擦猜裁材才财睬踩采彩菜蔡餐参蚕残惭惨灿苍舱仓沧藏操糙槽曹草厕策侧册测层蹭插叉茬茶查碴搽察岔差诧拆柴豺搀掺蝉馋谗缠铲产阐颤昌猖场尝常长偿肠厂敞畅唱倡超抄钞朝嘲潮巢吵炒车扯撤掣彻澈郴臣辰尘晨忱沉陈趁衬撑称城橙成呈乘程惩澄诚承逞骋秤吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽充冲虫崇宠抽酬畴踌稠愁筹仇绸瞅丑臭初出橱厨躇锄雏滁除楚础储矗搐触处揣川穿椽传船喘串疮窗幢床闯创吹炊捶锤垂春椿醇唇淳纯蠢戳绰疵茨磁雌辞慈瓷词此刺赐次聪葱囱匆从丛凑粗醋簇促蹿篡窜摧崔催脆瘁粹淬翠村存寸磋撮搓措挫错搭达答瘩打大呆歹傣戴带殆代贷袋待逮怠耽担丹单郸掸胆旦氮但惮淡诞弹蛋当挡党荡档刀捣蹈倒岛祷导到稻悼道盗德得的蹬灯登等瞪凳邓堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔颠掂滇碘点典靛垫电佃甸店惦奠淀殿碉叼雕凋刁掉吊钓调跌爹碟蝶迭谍叠丁盯叮钉顶鼎锭定订丢东冬董懂动栋侗恫冻洞兜抖斗陡豆逗痘都督毒犊独读堵睹赌杜镀肚度渡妒端短锻段断缎堆兑队对墩吨蹲敦顿囤钝盾遁掇哆多夺垛躲朵跺舵剁惰堕蛾峨鹅俄额讹娥恶厄扼遏鄂饿恩而儿耳尔饵洱二贰发罚筏伐乏阀法珐藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛坊芳方肪房防妨仿访纺放菲非啡飞肥匪诽吠肺废沸费芬酚吩氛分纷坟焚汾粉奋份忿愤粪丰封枫蜂峰锋风疯烽逢冯缝讽奉凤佛否夫敷肤孵扶拂辐幅氟符伏俘服浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐噶嘎该改概钙盖溉干甘杆柑竿肝赶感秆敢赣冈刚钢缸肛纲岗港杠篙皋高膏羔糕搞镐稿告哥歌搁戈鸽胳疙割革葛格蛤阁隔铬个各给根跟耕更庚羹埂耿梗工攻功恭龚供躬公宫弓巩汞拱贡共钩勾沟苟狗垢构购够辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇刮瓜剐寡挂褂乖拐怪棺关官冠观管馆罐惯灌贯光广逛瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽辊滚棍锅郭国果裹过哈骸孩海氦亥害骇酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉夯杭航壕嚎豪毫郝好耗号浩呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺嘿黑痕很狠恨哼亨横衡恒轰哄烘虹鸿洪宏弘红喉侯猴吼厚候后呼乎忽瑚壶葫胡蝴狐糊湖弧虎唬护互沪户花哗华猾滑画划化话槐徊怀淮坏欢环桓还缓换患唤痪豢焕涣宦幻荒慌黄磺蝗簧皇凰惶煌晃幌恍谎灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘荤昏婚魂浑混豁活伙火获或惑霍货祸击圾基机畸稽积箕肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际继纪嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁歼监坚尖笺间煎兼肩艰奸缄茧检柬碱硷拣捡简俭剪减荐槛鉴践贱见键箭件健舰剑饯渐溅涧建僵姜将浆江疆蒋桨奖讲匠酱降蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫窖揭接皆秸街阶截劫节茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净炯窘揪究纠玖韭久灸九酒厩救旧臼舅咎就疚鞠拘狙疽居驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧捐鹃娟倦眷卷绢撅攫抉掘倔爵桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸尽劲荆兢觉决诀绝均菌钧军君峻俊竣浚郡骏喀咖卡咯开揩楷凯慨刊堪勘坎砍看康慷糠扛抗亢炕考拷烤靠坷苛柯棵磕颗科壳咳可渴克刻客课肯啃垦恳坑吭空恐孔控抠口扣寇枯哭窟苦酷库裤夸垮挎跨胯块筷侩快宽款匡筐狂框矿眶旷况亏盔岿窥葵奎魁傀馈愧溃坤昆捆困括扩廓阔垃拉喇蜡腊辣啦莱来赖蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥琅榔狼廊郎朗浪捞劳牢老佬姥酪烙涝勒乐雷镭蕾磊累儡垒擂肋类泪棱楞冷厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利傈例俐痢立粒沥隶力璃哩俩联莲连镰廉怜涟帘敛脸链恋炼练粮凉梁粱良两辆量晾亮谅撩聊僚疗燎寥辽潦了撂镣廖料列裂烈劣猎琳林磷霖临邻鳞淋凛赁吝拎玲菱零龄铃伶羚凌灵陵岭领另令溜琉榴硫馏留刘瘤流柳六龙聋咙笼窿隆垄拢陇楼娄搂篓漏陋芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮驴吕铝侣旅履屡缕虑氯律率滤绿峦挛孪滦卵乱掠略抡轮伦仑沦纶论萝螺罗逻锣箩骡裸落洛骆络妈麻玛码蚂马骂嘛吗埋买麦卖迈脉瞒馒蛮满蔓曼慢漫谩芒茫盲氓忙莽猫茅锚毛矛铆卯茂冒帽貌贸么玫枚梅酶霉煤没眉媒镁每美昧寐妹媚门闷们萌蒙檬盟锰猛梦孟眯醚靡糜迷谜弥米秘觅泌蜜密幂棉眠绵冕免勉娩缅面苗描瞄藐秒渺庙妙蔑灭民抿皿敏悯闽明螟鸣铭名命谬摸摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谋牟某拇牡亩姆母墓暮幕募慕木目睦牧穆拿哪呐钠那娜纳氖乃奶耐奈南男难囊挠脑恼闹淖呢馁内嫩能妮霓倪泥尼拟你匿腻逆溺蔫拈年碾撵捻念娘酿鸟尿捏聂孽啮镊镍涅您柠狞凝宁拧泞牛扭钮纽脓浓农弄奴努怒女暖虐疟挪懦糯诺哦欧鸥殴藕呕偶沤啪趴爬帕怕琶拍排牌徘湃派攀潘盘磐盼畔判叛乓庞旁耪胖抛咆刨炮袍跑泡呸胚培裴赔陪配佩沛喷盆砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰坯砒霹批披劈琵毗啤脾疲皮匹痞僻屁譬篇偏片骗飘漂瓢票撇瞥拼频贫品聘乒坪苹萍平凭瓶评屏坡泼颇婆破魄迫粕剖扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫掐洽牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉枪呛腔羌墙蔷强抢橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍切茄且怯窃钦侵亲秦琴勤芹擒禽寝沁青轻氢倾卿清擎晴氰情顷请庆琼穷秋丘邱球求囚酋泅趋区蛆曲躯屈驱渠取娶龋趣去圈颧权醛泉全痊拳犬券劝缺炔瘸却鹊榷确雀裙群然燃冉染瓤壤攘嚷让饶扰绕惹热壬仁人忍韧任认刃妊纫扔仍日戎茸蓉荣融熔溶容绒冗揉柔肉茹蠕儒孺如辱乳汝入褥软阮蕊瑞锐闰润若弱撒洒萨腮鳃塞赛三叁伞散桑嗓丧搔骚扫嫂瑟色涩森僧莎砂杀刹沙纱傻啥煞筛晒珊苫杉山删煽衫闪陕擅赡膳善汕扇缮墒伤商赏晌上尚裳梢捎稍烧芍勺韶少哨邵绍奢赊蛇舌舍赦摄射慑涉社设砷申呻伸身深娠绅神沈审婶甚肾慎渗声生甥牲升绳省盛剩胜圣师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试收手首守寿授售受瘦兽蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱恕刷耍摔衰甩帅栓拴霜双爽谁水睡税吮瞬顺舜说硕朔烁斯撕嘶思私司丝死肆寺嗣四伺似饲巳松耸怂颂送宋讼诵搜艘擞嗽苏酥俗素速粟僳塑溯宿诉肃酸蒜算虽隋随绥髓碎岁穗遂隧祟孙损笋蓑梭唆缩琐索锁所塌他它她塔獭挞蹋踏胎苔抬台泰酞太态汰坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭汤塘搪堂棠膛唐糖倘躺淌趟烫掏涛滔绦萄桃逃淘陶讨套特藤腾疼誊梯剔踢锑提题蹄啼体替嚏惕涕剃屉天添填田甜恬舔腆挑条迢眺跳贴铁帖厅听烃汀廷停亭庭挺艇通桐酮瞳同铜彤童桶捅筒统痛偷投头透凸秃突图徒途涂屠土吐兔湍团推颓腿蜕褪退吞屯臀拖托脱鸵陀驮驼椭妥拓唾挖哇蛙洼娃瓦袜歪外豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕汪王亡枉网往旺望忘妄威巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫瘟温蚊文闻纹吻稳紊问嗡翁瓮挝蜗涡窝我斡卧握沃巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误昔熙析西硒矽晰嘻吸锡牺稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细瞎虾匣霞辖暇峡侠狭下厦夏吓掀锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象萧硝霄削哮嚣销消宵淆晓小孝校肖啸笑效楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑薪芯锌欣辛新忻心信衅星腥猩惺兴刑型形邢行醒幸杏性姓兄凶胸匈汹雄熊休修羞朽嗅锈秀袖绣墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续轩喧宣悬旋玄选癣眩绚靴薛学穴雪血勋熏循旬询寻驯巡殉汛训讯逊迅压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾邀腰妖瑶摇尧遥窑谣姚咬舀药要耀椰噎耶爷野冶也页掖业叶曳腋夜液一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎茵荫因殷音阴姻吟银淫寅饮尹引隐印英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映哟拥佣臃痈庸雍踊蛹咏泳涌永恿勇用幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉浴寓裕预豫驭鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院曰约越跃钥岳粤月悦阅耘云郧匀陨允运蕴酝晕韵孕匝砸杂栽哉灾宰载再在咱攒暂赞赃脏葬遭糟凿藻枣早澡蚤躁噪造皂灶燥责择则泽贼怎增憎曾赠扎喳渣札轧铡闸眨栅榨咋乍炸诈摘斋宅窄债寨瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽樟章彰漳张掌涨杖丈帐账仗胀瘴障招昭找沼赵照罩兆肇召遮折哲蛰辙者锗蔗这浙珍斟真甄砧臻贞针侦枕疹诊震振镇阵蒸挣睁征狰争怔整拯正政帧症郑证芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒中盅忠钟衷终种肿重仲众舟周州洲诌粥轴肘帚咒皱宙昼骤珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑住注祝驻抓爪拽专砖转撰赚篆桩庄装妆撞壮状椎锥追赘坠缀谆准捉拙卓桌琢茁酌啄着灼浊兹咨资姿滋淄孜紫仔籽滓子自渍字鬃棕踪宗综总纵邹走奏揍租足卒族祖诅阻组钻纂嘴醉最罪尊遵昨左佐柞做作坐座'; <BR>} <BR><BR>function ftPYStr(){ <BR>return '啊阿埃挨哎唉哀皚癌藹矮艾礙愛隘鞍氨安俺按暗岸胺案肮昂盎凹敖熬翺襖傲奧懊澳芭捌扒叭吧笆八疤巴拔跋靶把耙壩霸罷爸白柏百擺佰敗拜稗斑班搬扳般頒板版扮拌伴瓣半辦絆邦幫梆榜膀綁棒磅蚌鎊傍謗苞胞包褒剝薄雹保堡飽寶抱報暴豹鮑爆杯碑悲卑北輩背貝鋇倍狽備憊焙被奔苯本笨崩繃甭泵蹦迸逼鼻比鄙筆彼碧蓖蔽畢斃毖幣庇痹閉敝弊必辟壁臂避陛鞭邊編貶扁便變卞辨辯辮遍標彪膘表鼈憋別癟彬斌瀕濱賓擯兵冰柄丙秉餅炳病並玻菠播撥缽波博勃搏鉑箔伯帛舶脖膊渤泊駁捕蔔哺補埠不布步簿部怖擦猜裁材才財睬踩采彩菜蔡餐參蠶殘慚慘燦蒼艙倉滄藏操糙槽曹草廁策側冊測層蹭插叉茬茶查碴搽察岔差詫拆柴豺攙摻蟬饞讒纏鏟産闡顫昌猖場嘗常長償腸廠敞暢唱倡超抄鈔朝嘲潮巢吵炒車扯撤掣徹澈郴臣辰塵晨忱沈陳趁襯撐稱城橙成呈乘程懲澄誠承逞騁秤吃癡持匙池遲弛馳恥齒侈尺赤翅斥熾充沖蟲崇寵抽酬疇躊稠愁籌仇綢瞅醜臭初出櫥廚躇鋤雛滁除楚礎儲矗搐觸處揣川穿椽傳船喘串瘡窗幢床闖創吹炊捶錘垂春椿醇唇淳純蠢戳綽疵茨磁雌辭慈瓷詞此刺賜次聰蔥囪匆從叢湊粗醋簇促躥篡竄摧崔催脆瘁粹淬翠村存寸磋撮搓措挫錯搭達答瘩打大呆歹傣戴帶殆代貸袋待逮怠耽擔丹單鄲撣膽旦氮但憚淡誕彈蛋當擋黨蕩檔刀搗蹈倒島禱導到稻悼道盜德得的蹬燈登等瞪凳鄧堤低滴迪敵笛狄滌翟嫡抵底地蒂第帝弟遞締顛掂滇碘點典靛墊電佃甸店惦奠澱殿碉叼雕凋刁掉吊釣調跌爹碟蝶叠諜疊丁盯叮釘頂鼎錠定訂丟東冬董懂動棟侗恫凍洞兜抖鬥陡豆逗痘都督毒犢獨讀堵睹賭杜鍍肚度渡妒端短鍛段斷緞堆兌隊對墩噸蹲敦頓囤鈍盾遁掇哆多奪垛躲朵跺舵剁惰墮蛾峨鵝俄額訛娥惡厄扼遏鄂餓恩而兒耳爾餌洱二貳發罰筏伐乏閥法琺藩帆番翻樊礬釩繁凡煩反返範販犯飯泛坊芳方肪房防妨仿訪紡放菲非啡飛肥匪誹吠肺廢沸費芬酚吩氛分紛墳焚汾粉奮份忿憤糞豐封楓蜂峰鋒風瘋烽逢馮縫諷奉鳳佛否夫敷膚孵扶拂輻幅氟符伏俘服浮涪福袱弗甫撫輔俯釜斧脯腑府腐赴副覆賦複傅付阜父腹負富訃附婦縛咐噶嘎該改概鈣蓋溉幹甘杆柑竿肝趕感稈敢贛岡剛鋼缸肛綱崗港杠篙臯高膏羔糕搞鎬稿告哥歌擱戈鴿胳疙割革葛格蛤閣隔鉻個各給根跟耕更庚羹埂耿梗工攻功恭龔供躬公宮弓鞏汞拱貢共鈎勾溝苟狗垢構購夠辜菇咕箍估沽孤姑鼓古蠱骨谷股故顧固雇刮瓜剮寡挂褂乖拐怪棺關官冠觀管館罐慣灌貫光廣逛瑰規圭矽歸龜閨軌鬼詭癸桂櫃跪貴劊輥滾棍鍋郭國果裹過哈骸孩海氦亥害駭酣憨邯韓含涵寒函喊罕翰撼捍旱憾悍焊汗漢夯杭航壕嚎豪毫郝好耗號浩呵喝荷菏核禾和何合盒貉閡河涸赫褐鶴賀嘿黑痕很狠恨哼亨橫衡恒轟哄烘虹鴻洪宏弘紅喉侯猴吼厚候後呼乎忽瑚壺葫胡蝴狐糊湖弧虎唬護互滬戶花嘩華猾滑畫劃化話槐徊懷淮壞歡環桓還緩換患喚瘓豢煥渙宦幻荒慌黃磺蝗簧皇凰惶煌晃幌恍謊灰揮輝徽恢蛔回毀悔慧卉惠晦賄穢會燴彙諱誨繪葷昏婚魂渾混豁活夥火獲或惑霍貨禍擊圾基機畸稽積箕肌饑迹激譏雞姬績緝吉極棘輯籍集及急疾汲即嫉級擠幾脊己薊技冀季伎祭劑悸濟寄寂計記既忌際繼紀嘉枷夾佳家加莢頰賈甲鉀假稼價架駕嫁殲監堅尖箋間煎兼肩艱奸緘繭檢柬堿鹼揀撿簡儉剪減薦檻鑒踐賤見鍵箭件健艦劍餞漸濺澗建僵姜將漿江疆蔣槳獎講匠醬降蕉椒礁焦膠交郊澆驕嬌嚼攪鉸矯僥腳狡角餃繳絞剿教酵轎較叫窖揭接皆稭街階截劫節莖睛晶鯨京驚精粳經井警景頸靜境敬鏡徑痙靖竟競淨炯窘揪究糾玖韭久灸九酒廄救舊臼舅咎就疚鞠拘狙疽居駒菊局咀矩舉沮聚拒據巨具距踞鋸俱句懼炬劇捐鵑娟倦眷卷絹撅攫抉掘倔爵桔傑捷睫竭潔結解姐戒藉芥界借介疥誡屆巾筋斤金今津襟緊錦僅謹進靳晉禁近燼浸盡勁荊兢覺決訣絕均菌鈞軍君峻俊竣浚郡駿喀咖卡咯開揩楷凱慨刊堪勘坎砍看康慷糠扛抗亢炕考拷烤靠坷苛柯棵磕顆科殼咳可渴克刻客課肯啃墾懇坑吭空恐孔控摳口扣寇枯哭窟苦酷庫褲誇垮挎跨胯塊筷儈快寬款匡筐狂框礦眶曠況虧盔巋窺葵奎魁傀饋愧潰坤昆捆困括擴廓闊垃拉喇蠟臘辣啦萊來賴藍婪欄攔籃闌蘭瀾讕攬覽懶纜爛濫琅榔狼廊郎朗浪撈勞牢老佬姥酪烙澇勒樂雷鐳蕾磊累儡壘擂肋類淚棱楞冷厘梨犁黎籬狸離漓理李裏鯉禮莉荔吏栗麗厲勵礫曆利傈例俐痢立粒瀝隸力璃哩倆聯蓮連鐮廉憐漣簾斂臉鏈戀煉練糧涼梁粱良兩輛量晾亮諒撩聊僚療燎寥遼潦了撂鐐廖料列裂烈劣獵琳林磷霖臨鄰鱗淋凜賃吝拎玲菱零齡鈴伶羚淩靈陵嶺領另令溜琉榴硫餾留劉瘤流柳六龍聾嚨籠窿隆壟攏隴樓婁摟簍漏陋蘆盧顱廬爐擄鹵虜魯麓碌露路賂鹿潞祿錄陸戮驢呂鋁侶旅履屢縷慮氯律率濾綠巒攣孿灤卵亂掠略掄輪倫侖淪綸論蘿螺羅邏鑼籮騾裸落洛駱絡媽麻瑪碼螞馬罵嘛嗎埋買麥賣邁脈瞞饅蠻滿蔓曼慢漫謾芒茫盲氓忙莽貓茅錨毛矛鉚卯茂冒帽貌貿麽玫枚梅酶黴煤沒眉媒鎂每美昧寐妹媚門悶們萌蒙檬盟錳猛夢孟眯醚靡糜迷謎彌米秘覓泌蜜密冪棉眠綿冕免勉娩緬面苗描瞄藐秒渺廟妙蔑滅民抿皿敏憫閩明螟鳴銘名命謬摸摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌謀牟某拇牡畝姆母墓暮幕募慕木目睦牧穆拿哪呐鈉那娜納氖乃奶耐奈南男難囊撓腦惱鬧淖呢餒內嫩能妮霓倪泥尼擬你匿膩逆溺蔫拈年碾攆撚念娘釀鳥尿捏聶孽齧鑷鎳涅您檸獰凝甯擰濘牛扭鈕紐膿濃農弄奴努怒女暖虐瘧挪懦糯諾哦歐鷗毆藕嘔偶漚啪趴爬帕怕琶拍排牌徘湃派攀潘盤磐盼畔判叛乓龐旁耪胖抛咆刨炮袍跑泡呸胚培裴賠陪配佩沛噴盆砰抨烹澎彭蓬棚硼篷膨朋鵬捧碰坯砒霹批披劈琵毗啤脾疲皮匹痞僻屁譬篇偏片騙飄漂瓢票撇瞥拼頻貧品聘乒坪蘋萍平憑瓶評屏坡潑頗婆破魄迫粕剖撲鋪仆莆葡菩蒲埔樸圃普浦譜曝瀑期欺棲戚妻七淒漆柒沏其棋奇歧畦崎臍齊旗祈祁騎起豈乞企啓契砌器氣迄棄汽泣訖掐洽牽扡釺鉛千遷簽仟謙乾黔錢鉗前潛遣淺譴塹嵌欠歉槍嗆腔羌牆薔強搶橇鍬敲悄橋瞧喬僑巧鞘撬翹峭俏竅切茄且怯竊欽侵親秦琴勤芹擒禽寢沁青輕氫傾卿清擎晴氰情頃請慶瓊窮秋丘邱球求囚酋泅趨區蛆曲軀屈驅渠取娶齲趣去圈顴權醛泉全痊拳犬券勸缺炔瘸卻鵲榷確雀裙群然燃冉染瓤壤攘嚷讓饒擾繞惹熱壬仁人忍韌任認刃妊紉扔仍日戎茸蓉榮融熔溶容絨冗揉柔肉茹蠕儒孺如辱乳汝入褥軟阮蕊瑞銳閏潤若弱撒灑薩腮鰓塞賽三三傘散桑嗓喪搔騷掃嫂瑟色澀森僧莎砂殺刹沙紗傻啥煞篩曬珊苫杉山刪煽衫閃陝擅贍膳善汕扇繕墒傷商賞晌上尚裳梢捎稍燒芍勺韶少哨邵紹奢賒蛇舌舍赦攝射懾涉社設砷申呻伸身深娠紳神沈審嬸甚腎慎滲聲生甥牲升繩省盛剩勝聖師失獅施濕詩屍虱十石拾時什食蝕實識史矢使屎駛始式示士世柿事拭誓逝勢是嗜噬適仕侍釋飾氏市恃室視試收手首守壽授售受瘦獸蔬樞梳殊抒輸叔舒淑疏書贖孰熟薯暑曙署蜀黍鼠屬術述樹束戍豎墅庶數漱恕刷耍摔衰甩帥栓拴霜雙爽誰水睡稅吮瞬順舜說碩朔爍斯撕嘶思私司絲死肆寺嗣四伺似飼巳松聳慫頌送宋訟誦搜艘擻嗽蘇酥俗素速粟僳塑溯宿訴肅酸蒜算雖隋隨綏髓碎歲穗遂隧祟孫損筍蓑梭唆縮瑣索鎖所塌他它她塔獺撻蹋踏胎苔擡台泰酞太態汰坍攤貪癱灘壇檀痰潭譚談坦毯袒碳探歎炭湯塘搪堂棠膛唐糖倘躺淌趟燙掏濤滔縧萄桃逃淘陶討套特藤騰疼謄梯剔踢銻提題蹄啼體替嚏惕涕剃屜天添填田甜恬舔腆挑條迢眺跳貼鐵帖廳聽烴汀廷停亭庭挺艇通桐酮瞳同銅彤童桶捅筒統痛偷投頭透凸禿突圖徒途塗屠土吐兔湍團推頹腿蛻褪退吞屯臀拖托脫鴕陀馱駝橢妥拓唾挖哇蛙窪娃瓦襪歪外豌彎灣玩頑丸烷完碗挽晚皖惋宛婉萬腕汪王亡枉網往旺望忘妄威巍微危韋違桅圍唯惟爲濰維葦萎委偉僞尾緯未蔚味畏胃喂魏位渭謂尉慰衛瘟溫蚊文聞紋吻穩紊問嗡翁甕撾蝸渦窩我斡臥握沃巫嗚鎢烏汙誣屋無蕪梧吾吳毋武五捂午舞伍侮塢戊霧晤物勿務悟誤昔熙析西硒矽晰嘻吸錫犧稀息希悉膝夕惜熄烯溪汐犀檄襲席習媳喜銑洗系隙戲細瞎蝦匣霞轄暇峽俠狹下廈夏嚇掀鍁先仙鮮纖鹹賢銜舷閑涎弦嫌顯險現獻縣腺餡羨憲陷限線相廂鑲香箱襄湘鄉翔祥詳想響享項巷橡像向象蕭硝霄削哮囂銷消宵淆曉小孝校肖嘯笑效楔些歇蠍鞋協挾攜邪斜脅諧寫械卸蟹懈泄瀉謝屑薪芯鋅欣辛新忻心信釁星腥猩惺興刑型形邢行醒幸杏性姓兄凶胸匈洶雄熊休修羞朽嗅鏽秀袖繡墟戌需虛噓須徐許蓄酗敘旭序畜恤絮婿緒續軒喧宣懸旋玄選癬眩絢靴薛學穴雪血勳熏循旬詢尋馴巡殉汛訓訊遜迅壓押鴉鴨呀丫芽牙蚜崖衙涯雅啞亞訝焉咽閹煙淹鹽嚴研蜒岩延言顔閻炎沿奄掩眼衍演豔堰燕厭硯雁唁彥焰宴諺驗殃央鴦秧楊揚佯瘍羊洋陽氧仰癢養樣漾邀腰妖瑤搖堯遙窯謠姚咬舀藥要耀椰噎耶爺野冶也頁掖業葉曳腋夜液一壹醫揖銥依伊衣頤夷遺移儀胰疑沂宜姨彜椅蟻倚已乙矣以藝抑易邑屹億役臆逸肄疫亦裔意毅憶義益溢詣議誼譯異翼翌繹茵蔭因殷音陰姻吟銀淫寅飲尹引隱印英櫻嬰鷹應纓瑩螢營熒蠅迎贏盈影穎硬映喲擁傭臃癰庸雍踴蛹詠泳湧永恿勇用幽優悠憂尤由郵鈾猶油遊酉有友右佑釉誘又幼迂淤于盂榆虞愚輿余俞逾魚愉渝漁隅予娛雨與嶼禹宇語羽玉域芋郁籲遇喻峪禦愈欲獄育譽浴寓裕預豫馭鴛淵冤元垣袁原援轅園員圓猿源緣遠苑願怨院曰約越躍鑰嶽粵月悅閱耘雲鄖勻隕允運蘊醞暈韻孕匝砸雜栽哉災宰載再在咱攢暫贊贓髒葬遭糟鑿藻棗早澡蚤躁噪造皂竈燥責擇則澤賊怎增憎曾贈紮喳渣劄軋鍘閘眨柵榨咋乍炸詐摘齋宅窄債寨瞻氈詹粘沾盞斬輾嶄展蘸棧占戰站湛綻樟章彰漳張掌漲杖丈帳賬仗脹瘴障招昭找沼趙照罩兆肇召遮折哲蟄轍者鍺蔗這浙珍斟真甄砧臻貞針偵枕疹診震振鎮陣蒸掙睜征猙爭怔整拯正政幀症鄭證芝枝支吱蜘知肢脂汁之織職直植殖執值侄址指止趾只旨紙志摯擲至致置幟峙制智秩稚質炙痔滯治窒中盅忠鍾衷終種腫重仲衆舟周州洲謅粥軸肘帚咒皺宙晝驟珠株蛛朱豬諸誅逐竹燭煮拄矚囑主著柱助蛀貯鑄築住注祝駐抓爪拽專磚轉撰賺篆樁莊裝妝撞壯狀椎錐追贅墜綴諄准捉拙卓桌琢茁酌啄著灼濁茲咨資姿滋淄孜紫仔籽滓子自漬字鬃棕蹤宗綜總縱鄒走奏揍租足卒族祖詛阻組鑽纂嘴醉最罪尊遵昨左佐柞做作坐座'; <BR>} <BR><BR>function traditionalized(cc){ <BR>var str=''; <BR>for(var i=0;i&lt;cc.length;i++){ <BR>if(charPYStr().indexOf(cc.charAt(i))!=-1) <BR>str+=ftPYStr().charAt(charPYStr().indexOf(cc.charAt(i))); <BR>else <BR>str+=cc.charAt(i); <BR>} <BR>return str; <BR>} <BR><BR>function simplized(cc){ <BR>var str=''; <BR>for(var i=0;i&lt;cc.length;i++){ <BR>if(ftPYStr().indexOf(cc.charAt(i))!=-1) <BR>str+=charPYStr().charAt(ftPYStr().indexOf(cc.charAt(i))); <BR>else <BR>str+=cc.charAt(i); <BR>} <BR>return str; <BR>} <BR><BR>function convert(){ <BR>if(h1.value==0) <BR>txt.value=simplized(txt.value); <BR>else <BR>txt.value=traditionalized(txt.value); <BR>} <BR><BR>&lt;/script&gt; <BR>&lt;/center&gt; <BR>&lt;/body&gt; <BR>&lt;/html&gt; <BR><BR>&lt;/BODY&gt; <BR>&lt;/HTML&gt; <BR></FONT><BR>转自：动态网制作指南http://www.knowsky.com<img src ="http://www.blogjava.net/nayanliu/aggbug/5912.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/nayanliu/" target="_blank">楚客</a> 2005-06-11 16:58 <a href="http://www.blogjava.net/nayanliu/articles/5912.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>FileSystemObject 的例子（处理驱动器、文件夹、文件）</title><link>http://www.blogjava.net/nayanliu/articles/5885.html</link><dc:creator>楚客</dc:creator><author>楚客</author><pubDate>Fri, 10 Jun 2005 07:07:00 GMT</pubDate><guid>http://www.blogjava.net/nayanliu/articles/5885.html</guid><wfw:comment>http://www.blogjava.net/nayanliu/comments/5885.html</wfw:comment><comments>http://www.blogjava.net/nayanliu/articles/5885.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/nayanliu/comments/commentRss/5885.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/nayanliu/services/trackbacks/5885.html</trackback:ping><description><![CDATA[<BLOCKQUOTE><FONT size=1>使用 <B>FileSystemObject</B> (FSO) 对象模式，可以有计划地处理驱动器和文件夹，就像在 Windows 资源管理器中交互式地处理它们一样。可以复制和移动文件夹，获取有关驱动器和文件夹的信息，等等。 </FONT>
<P></P></BLOCKQUOTE>
<H5><FONT size=1>获取有关驱动器的信息</FONT></H5>
<BLOCKQUOTE><FONT size=1>可以用 <B>Drive</B> 对象来获得有关各种驱动器的信息，这些驱动器是实物地或通过网络连接到系统上的。它的属性可以用来获得下面的信息内容： </FONT>
<P>
<UL>
<LI><FONT size=1>驱动器的总容量，以字节为单位（<B>TotalSize</B> 属性） </FONT>
<LI><FONT size=1>驱动器的可用空间是多少，以字节为单位（<B>AvailableSpace</B> 或 <B>FreeSpace</B> 属性） </FONT>
<LI><FONT size=1>哪个号被赋给了该驱动器（<B>DriveLetter</B> 属性） </FONT>
<LI><FONT size=1>驱动器的类型是什么，如可移动的、固定的、网络的、CD-ROM 或 RAM 磁盘（<B>DriveType</B> 属性） </FONT>
<LI><FONT size=1>驱动器的序列号（<B>SerialNumber </B>属性） </FONT>
<LI><FONT size=1>驱动器使用的文件系统类型，如 FAT、FAT32、NTFS 等等（<B>FileSystem</B> 属性） </FONT>
<LI><FONT size=1>驱动器是否可以使用（<B>IsReady</B> 属性） </FONT>
<LI><FONT size=1>共享和/或卷的名字（<B>ShareName</B> 和 <B>VolumeName</B> 属性） </FONT>
<LI><FONT size=1>驱动器的路径或根文件夹（<B>Path</B> 和 <B>RootFolder</B> 属性） </FONT></LI></UL><FONT size=1>请考察</FONT><A href="mk:@MSITStore:G:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\Rar$DI00.622\JSCRIPT5.CHM::/htm/sgFSOSample.htm#DriveInfo"><FONT size=1>示例代码</FONT></A><FONT size=1>，来领会如何在 <B>FileSystemObject</B> 中使用这些属性。 </FONT>
<P></P></BLOCKQUOTE>
<H5><FONT size=1>Drive 对象的用法示例</FONT></H5>
<BLOCKQUOTE><FONT size=1>使用 <B>Drive</B> 对象来收集有关驱动器的信息。在下面的代码中，没有对实际的 <B>Drive</B> 对象的引用；相反，使用 <B>GetDrive</B> 方法来获得现有 <B>Drive</B> 对象的引用（在这个例子中就是 drv）。 </FONT>
<P><FONT size=1>下面示例示范了如何在 VBScript 中使用 <B>Drive</B> 对象： </FONT>
<BLOCKQUOTE><PRE><FONT class=9v face=" 宋体" size=1>Sub ShowDriveInfo(drvPath)
  Dim fso, drv, s
  Set fso = CreateObject("Scripting.FileSystemObject")
  Set drv = fso.GetDrive(fso.GetDriveName(drvPath))
  s = "Drive " &amp; UCase(drvPath) &amp; " - "
  s = s &amp; drv.VolumeName &amp; "&lt;br&gt;"
  s = s &amp; "Total Space: " &amp; FormatNumber(drv.TotalSize / 1024, 0)
  s = s &amp; " Kb" &amp; "&lt;br&gt;"
  s = s &amp; "Free Space: " &amp; FormatNumber(drv.FreeSpace / 1024, 0)
  s = s &amp; " Kb" &amp; "&lt;br&gt;"
  Response.Write s
End Sub
</FONT></PRE></BLOCKQUOTE><FONT size=1>下面的代码说明在 JScript 中实现同样的功能： </FONT>
<BLOCKQUOTE><PRE><FONT class=9v face=" 宋体" size=1>function ShowDriveInfo1(drvPath)
{
  var fso, drv, s ="";
  fso = new ActiveXObject("Scripting.FileSystemObject");
  drv = fso.GetDrive(fso.GetDriveName(drvPath));
  s += "Drive " + drvPath.toUpperCase()+ " - ";
  s += drv.VolumeName + "&lt;br&gt;";
  s += "Total Space: " + drv.TotalSize / 1024;
  s += " Kb" + "&lt;br&gt;"; 
  s += "Free Space: " + drv.FreeSpace / 1024;
  s += " Kb" + "&lt;br&gt;";
  Response.Write(s);
}
</FONT></PRE></BLOCKQUOTE></BLOCKQUOTE>
<H5><FONT size=1>处理文件夹</FONT></H5>
<BLOCKQUOTE><FONT size=1>在下面的表中，描述了普通的文件夹任务和执行它们的方法。 </FONT>
<P>
<TABLE cellSpacing=0 cellPadding=5 width="87%" border=1>
<TBODY>
<TR vAlign=top bgColor=#dddddd>
<TD><FONT class=9v size=1><B>任务</B></FONT></TD>
<TD><FONT class=9v size=1><B>方法</B></FONT></TD></TR>
<TR vAlign=top>
<TD><FONT class=9v size=1>创建文件夹。</FONT></TD>
<TD><FONT class=9v size=1><B>FileSystemObject.CreateFolder</B></FONT></TD></TR>
<TR vAlign=top>
<TD><FONT class=9v size=1>删除文件夹。</FONT></TD>
<TD><FONT class=9v><FONT size=1><B>Folder.Delete</B> 或 <B>FileSystemObject.DeleteFolder</B></FONT></FONT></TD></TR>
<TR vAlign=top>
<TD><FONT class=9v size=1>移动文件夹。</FONT></TD>
<TD><FONT class=9v><FONT size=1><B>Folder.Move</B> 或 <B>FileSystemObject.MoveFolder</B></FONT></FONT></TD></TR>
<TR vAlign=top>
<TD><FONT class=9v size=1>复制文件夹。</FONT></TD>
<TD><FONT class=9v><FONT size=1><B>Folder.Copy</B> 或 <B>FileSystemObject.CopyFolder</B></FONT></FONT></TD></TR>
<TR vAlign=top>
<TD><FONT class=9v size=1>检索文件夹的名字。</FONT></TD>
<TD><FONT class=9v size=1><B>Folder.Name</B></FONT></TD></TR>
<TR vAlign=top>
<TD><FONT class=9v size=1>如果文件夹在驱动器上存在，则找出它。</FONT></TD>
<TD><FONT class=9v size=1><B>FileSystemObject.FolderExists</B></FONT></TD></TR>
<TR vAlign=top>
<TD><FONT class=9v size=1>获得现有 <B>Folder</B> 对象的实例。</FONT></TD>
<TD><FONT class=9v size=1><B>FileSystemObject.GetFolder</B></FONT></TD></TR>
<TR vAlign=top>
<TD><FONT class=9v size=1>找出文件夹的父文件夹名。</FONT></TD>
<TD><FONT class=9v size=1><B>FileSystemObject.GetParentFolderName</B></FONT></TD></TR>
<TR vAlign=top>
<TD><FONT class=9v size=1>找出系统文件夹的路径。</FONT></TD>
<TD><FONT class=9v size=1><B>FileSystemObject.GetSpecialFolder</B></FONT></TD></TR></TBODY></TABLE>
<P><FONT size=1>请考察</FONT><A href="mk:@MSITStore:G:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\Rar$DI00.622\JSCRIPT5.CHM::/htm/sgFSOSample.htm#FolderInfo"><FONT size=1>示例代码</FONT></A><FONT size=1>，来看看在 <B>FileSystemObject</B> 中使用了多少种这些的方法和属性。 </FONT>
<P><FONT size=1>下面的示例示范了如何在 VBScript 中使用 <B>Folder</B> 和 <B>FileSystemObject</B> 对象，来操作文件夹和获得有关它们的信息： </FONT>
<P><FONT size=1></FONT>
<BLOCKQUOTE><PRE><FONT class=9v face=" 宋体" size=1>Sub ShowFolderInfo()
  Dim fso, fldr, s
  ' 获得 FileSystemObject 的实例。
  Set fso = CreateObject("Scripting.FileSystemObject")
  ' 获得 Drive 对象。
  Set fldr = fso.GetFolder("c:")
  ' 打印父文件夹名字。
  Response.Write "Parent folder name is: " &amp; fldr &amp; "&lt;br&gt;"
  ' 打印驱动器名字。
  Response.Write "Contained on drive " &amp; fldr.Drive &amp; "&lt;br&gt;"
  ' 打印根文件名。
  If fldr.IsRootFolder = True Then
    Response.Write "This is the root folder." &amp; ""&lt;br&gt;"&lt;br&gt;"
  Else
    Response.Write "This folder isn't a root folder." &amp; "&lt;br&gt;&lt;br&gt;" 
  End If
  ' 用 FileSystemObject 对象创建新的文件夹。
  fso.CreateFolder ("C:\Bogus")
  Response.Write "Created folder C:\Bogus" &amp; "&lt;br&gt;"
  ' 打印文件夹的基本名字。
  Response.Write "Basename = " &amp; fso.GetBaseName("c:\bogus") &amp; "&lt;br&gt;"
  ' 删除新创建的文件夹。
  fso.DeleteFolder ("C:\Bogus")
  Response.Write "Deleted folder C:\Bogus" &amp; "&lt;br&gt;"
End Sub
</FONT></PRE></BLOCKQUOTE><FONT size=1>下面的示例显示如何在 JScript 中使用 <B>Folder</B> 和 <B>FileSystemObject</B> 对象： </FONT>
<BLOCKQUOTE><PRE><FONT class=9v face=" 宋体" size=1>function ShowFolderInfo()
{
  var fso, fldr, s = "";
  // 获得 FileSystemObject 的实例。
  fso = new ActiveXObject("Scripting.FileSystemObject");
  // 获得 Drive 对象。
  fldr = fso.GetFolder("c:");
  // 打印父文件夹名。
  Response.Write("Parent folder name is: " + fldr + "&lt;br&gt;");
  // 打印驱动器名字。
  Response.Write("Contained on drive " + fldr.Drive + "&lt;br&gt;");
  // 打印根文件名。
  if (fldr.IsRootFolder)
    Response.Write("This is the root folder.");
  else
    Response.Write("This folder isn't a root folder.");
  Response.Write("&lt;br&gt;&lt;br&gt;");
  // 用 FileSystemObject 对象创建新的文件夹。
  fso.CreateFolder ("C:\\Bogus");
  Response.Write("Created folder C:\\Bogus" + "&lt;br&gt;");
  // 打印文件夹的基本名。
  Response.Write("Basename = " + fso.GetBaseName("c:\\bogus") + "&lt;br&gt;");
  // 删除新创建的文件夹。
  fso.DeleteFolder ("C:\\Bogus");
  Response.Write("Deleted folder C:\\Bogus" + "&lt;br&gt;");
}
</FONT><STRONG><FONT color=#660033></FONT></STRONG></PRE><PRE><STRONG><FONT color=#660033></FONT></STRONG><FONT size=1>&nbsp;</FONT></PRE><STRONG><FONT color=#660033><PRE><FONT size=1><HR></FONT></PRE><PRE><FONT size=1>处理文件</FONT></PRE><PRE><BLOCKQUOTE><FONT size=1>有两种主要的文件处理类型： </FONT><P><UL><LI><FONT size=1>创建、添加或删除数据，以及读取文件 </FONT><LI><FONT size=1>移动、复制和删除文件 </FONT></LI></UL></BLOCKQUOTE><H5><FONT size=1>创建文件</FONT></H5><BLOCKQUOTE><FONT size=1>创建空文本文件（有时被叫做“文本流”）有三种方法。 </FONT><P><FONT size=1>第一种方法是用 <B>CreateTextFile</B> 方法。 下面的示例示范了在 VBScript 中如何用这种方法来创建文本文件： </FONT><P><FONT size=1></FONT><BLOCKQUOTE><PRE><FONT class=9v face=" 宋体" size=1>Dim fso, f1
Set fso = CreateObject("Scripting.FileSystemObject")
Set f1 = fso.CreateTextFile("c:\testfile.txt", True)
</FONT></PRE></BLOCKQUOTE><FONT size=1>要在 JScript 中用这种方法，则使用下面的代码： </FONT><P><BLOCKQUOTE><PRE><FONT class=9v face=" 宋体" size=1>var fso, f1;
fso = new ActiveXObject("Scripting.FileSystemObject");
f1 = fso.CreateTextFile("c:\\testfile.txt", true);
</FONT></PRE></BLOCKQUOTE><FONT size=1>请考察</FONT><A href="mk:@MSITStore:G:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\Rar$DI00.622\JSCRIPT5.CHM::/htm/sgFSOSample.htm#CreateTextFile"><FONT size=1>示例代码</FONT></A><FONT size=1>，来领会如何在 <B>FileSystemObject</B> 中使用 <B>CreateTextFile</B> 方法。 </FONT><P><FONT size=1>创建文本文件的第二种方法是，使用 <B>FileSystemObject</B> 对象的 <B>OpenTextFile</B> 方法，并设置 <B>ForWriting</B> 标志。在 VBScript 中，代码就像下面的示例一样： </FONT><BLOCKQUOTE><PRE><FONT class=9v face=" 宋体" size=1>Dim fso, ts
Const ForWriting = 2
Set fso = CreateObject("Scripting. FileSystemObject")
Set ts = fso.OpenTextFile("c:\test.txt", ForWriting, True)
</FONT></PRE></BLOCKQUOTE><FONT size=1>要在 JScript 中使用这种方法来创建文本文件，则使用下面的代码： </FONT><P><BLOCKQUOTE><PRE><FONT class=9v face=" 宋体" size=1>var fso, ts;
var ForWriting= 2;
fso = new ActiveXObject("Scripting.FileSystemObject");
ts = fso.OpenTextFile("c:\\test.txt", ForWriting, true);
</FONT></PRE></BLOCKQUOTE><FONT size=1>创建文本文件的第三种方法是，使用 <B>OpenAsTextStream</B> 方法，并设置 <B>ForWriting</B> 标志。要使用这种方法，在 VBScript 中使用下面的代码： </FONT><P><BLOCKQUOTE><PRE><FONT class=9v face=" 宋体" size=1>Dim fso, f1, ts
Const ForWriting = 2
Set fso = CreateObject("Scripting.FileSystemObject")
fso.CreateTextFile ("c:\test1.txt")
Set f1 = fso.GetFile("c:\test1.txt")
Set ts = f1.OpenAsTextStream(ForWriting, True)
</FONT></PRE></BLOCKQUOTE><FONT size=1>在 JScript 中，则使用下面示例中的代码： </FONT><P><BLOCKQUOTE><PRE><FONT class=9v face=" 宋体" size=1>var fso, f1, ts;
var ForWriting = 2;
fso = new ActiveXObject("Scripting.FileSystemObject");
fso.CreateTextFile ("c:\\test1.txt");
f1 = fso.GetFile("c:\\test1.txt");
ts = f1.OpenAsTextStream(ForWriting, true);
</FONT></PRE></BLOCKQUOTE></BLOCKQUOTE><H5><FONT size=1>添加数据到文件中</FONT></H5><BLOCKQUOTE><FONT size=1>一旦创建了文本文件，使用下面的三个步骤向文件添加数据： </FONT><P><OL><LI><FONT size=1>打开文本文件。 </FONT><LI><FONT size=1>写入数据。 </FONT><LI><FONT size=1>关闭文件。 </FONT></LI></OL><FONT size=1>要打开现有的文件，则使用 <B>FileSystemObject</B> 对象的 <B>OpenTextFile</B> 方法或 <B>File</B> 对象的 <B>OpenAsTextStream</B> 方法。 </FONT><P><FONT size=1>要写数据到打开的文本文件，则根据下表所述任务使用 <B>TextStream</B> 对象的 <B>Write</B>、<B>WriteLine</B> 或 <B>WriteBlankLines</B> 方法。 </FONT><P><TABLE cellSpacing=0 cellPadding=5 width="87%" border=1><TBODY><TR vAlign=top bgColor=#dddddd><TD><FONT class=9v size=1><B>任务</B></FONT></TD><TD><FONT class=9v size=1><B>方法</B></FONT></TD></TR><TR vAlign=top><TD><FONT class=9v size=1>向打开的文本文件写数据，不用后续一个新行字符。</FONT></TD><TD><FONT class=9v size=1><B>Write</B></FONT></TD></TR><TR vAlign=top><TD><FONT class=9v size=1>向打开的文本文件写数据，后续一个新行字符。</FONT></TD><TD><FONT class=9v size=1><B>WriteLine</B></FONT></TD></TR><TR vAlign=top><TD><FONT class=9v size=1>向打开的文本文件写一个或多个空白行。</FONT></TD><TD><FONT class=9v size=1><B>WriteBlankLines</B></FONT></TD></TR></TBODY></TABLE><P><FONT size=1>请考察</FONT><A href="mk:@MSITStore:G:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\Rar$DI00.622\JSCRIPT5.CHM::/htm/sgFSOSample.htm#WriteToFile"><FONT size=1>示例代码</FONT></A><FONT size=1>，来领会如何在 <B>FileSystemObject</B> 对象中使用 <B>Write</B>、<B>WriteLine</B> 和 <B>WriteBlankLines</B> 方法。 </FONT><P><FONT size=1>要关闭一个打开的文件，则使用 <B>TextStream</B> 对象的 <B>Close</B> 方法。 </FONT><P><FONT size=1>请考察</FONT><A href="mk:@MSITStore:G:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\Rar$DI00.622\JSCRIPT5.CHM::/htm/sgFSOSample.htm#Close"><FONT size=1>示例代码</FONT></A><FONT size=1>，来领会如何在 <B>FileSystemObject</B> 中使用 <B>Close</B> 方法。 </FONT><P><TABLE cellSpacing=0 cellPadding=0 width="87%" border=0><TBODY><TR><TD vAlign=bottom colSpan=2><FONT size=1><HR class=9v noShade SIZE=3></FONT></TD></TR><TR><TD vAlign=top><FONT class=9v><FONT size=1><B>注意</B>&nbsp;&nbsp;新行字符包含一个或几个字符（取决于操作系统），以把光标移动到下一行的开始位置（回车/换行）。注意某些字符串末尾可能已经有这个非打印字符了。</FONT></FONT></TD></TR><TR><TD vAlign=top colSpan=2><FONT size=1><HR class=9v noShade SIZE=3></FONT></TD></TR></TBODY></TABLE><P><FONT size=1>下面的 VBScript 例子示范了如何打开文件，和同时使用三种写方法来向文件添加数据，然后关闭文件： </FONT><P><FONT size=1></FONT><BLOCKQUOTE><PRE><FONT class=9v face=" 宋体" size=1>Sub CreateFile()
  Dim fso, tf
  Set fso = CreateObject("Scripting.FileSystemObject")
  Set tf = fso.CreateTextFile("c:\testfile.txt", True)
  ' 写一行，并且带有新行字符。
  tf.WriteLine("Testing 1, 2, 3.") 
  ' 向文件写三个新行字符。      
  tf.WriteBlankLines(3) 
  ' 写一行。
  tf.Write ("This is a test.") 
  tf.Close
End Sub</FONT></PRE></BLOCKQUOTE><FONT size=1>这个示例示范了在 JScript 中如何使用这三个方法： </FONT><P><BLOCKQUOTE><PRE><FONT class=9v face=" 宋体" size=1>function CreateFile()
{
  var fso, tf;
  fso = new ActiveXObject("Scripting.FileSystemObject");
  tf = fso.CreateTextFile("c:\\testfile.txt", true);
  // 写一行，并且带有新行字符。
  tf.WriteLine("Testing 1, 2, 3.") ;
  // 向文件写三个新行字符。  
  tf.WriteBlankLines(3) ;
  // 写一行。
  tf.Write ("This is a test.");
  tf.Close();
}</FONT></PRE></BLOCKQUOTE></BLOCKQUOTE><H5><FONT size=1>读取文件</FONT></H5><BLOCKQUOTE><FONT size=1>要从文本文件读取数据，则使用 <B>TextStream</B> 对象的 <B>Read</B>、<B>ReadLine</B> 或 <B>ReadAll</B> 方法。下表描述了不同的任务应使用哪种方法。 </FONT><P><TABLE cellSpacing=0 cellPadding=5 width="87%" border=1><TBODY><TR vAlign=top bgColor=#dddddd><TD><FONT class=9v size=1><B>任务</B></FONT></TD><TD><FONT class=9v size=1><B>方法</B></FONT></TD></TR><TR vAlign=top><TD><FONT class=9v size=1>从文件读取指定数量的字符。</FONT></TD><TD><FONT class=9v size=1><B>Read</B></FONT></TD></TR><TR vAlign=top><TD><FONT class=9v size=1>读取一整行（一直到但不包括新行字符）。</FONT></TD><TD><FONT class=9v size=1><B>ReadLine</B></FONT></TD></TR><TR vAlign=top><TD><FONT class=9v size=1>读取文本文件的整个内容。</FONT></TD><TD><FONT class=9v size=1><B>ReadAll</B></FONT></TD></TR></TBODY></TABLE><P><FONT size=1>请考察</FONT><A href="mk:@MSITStore:G:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\Rar$DI00.622\JSCRIPT5.CHM::/htm/sgFSOSample.htm#ReadFromFile"><FONT size=1>示例代码</FONT></A><FONT size=1>，来领会如何在 <B>FileSystemObject</B> 中使用 <B>ReadAll</B> 和 <B>ReadLine</B> 方法。 </FONT><P><FONT size=1>如果使用 <B>Read</B> 或 <B>ReadLine</B> 方法，并且想跳过数据的特殊部分，则使用 <B>Skip</B> 或 <B>SkipLine</B> 方法。read 方法的结果文本存在一个字符串中，该字符串可以显示在一个控件中，也可以用字符串函数（如 <B>Left</B>、<B>Right</B> 和 <B>Mid</B>）来分析，连接等等。 </FONT><P><FONT size=1>下面的 VBScript 示例示范了如何打开文件，和如何写数据到文件中并从文件读取数据： </FONT><P><FONT size=1></FONT><BLOCKQUOTE><PRE><FONT class=9v face=" 宋体" size=1>Sub ReadFiles
  Dim fso, f1, ts, s
  Const ForReading = 1
  Set fso = CreateObject("Scripting.FileSystemObject")
  Set f1 = fso.CreateTextFile("c:\testfile.txt", True)
  ' 写一行。
  Response.Write "Writing file &lt;br&gt;"
  f1.WriteLine "Hello World"
  f1.WriteBlankLines(1)
  f1.Close
  ' 读取文件的内容。
  Response.Write "Reading file &lt;br&gt;"
  Set ts = fso.OpenTextFile("c:\testfile.txt", ForReading)
  s = ts.ReadLine
  Response.Write "File contents = '" &amp; s &amp; "'"
  ts.Close
End Sub
</FONT></PRE></BLOCKQUOTE><FONT size=1>下面的代码示范了在 JScript 中做同样的事： </FONT><P><BLOCKQUOTE><PRE><FONT class=9v face=" 宋体" size=1>function ReadFiles()
{
  var fso, f1, ts, s;
  var ForReading = 1;
  fso = new ActiveXObject("Scripting.FileSystemObject");
  f1 = fso.CreateTextFile("c:\\testfile.txt", true);
  // 写一行。
  Response.Write("Writing file &lt;br&gt;");
  f1.WriteLine("Hello World");
  f1.WriteBlankLines(1);
  f1.Close();
  // 读取文件的内容。
  Response.Write("Reading file &lt;br&gt;");
  ts = fso.OpenTextFile("c:\\testfile.txt", ForReading);
  s = ts.ReadLine();
  Response.Write("File contents = '" + s + "'");
  ts.Close();
}
</FONT></PRE></BLOCKQUOTE></BLOCKQUOTE><H5><FONT size=1>移动、复制和删除文件</FONT></H5><BLOCKQUOTE><FONT size=1>FSO 对象模式各有两种方法移动、复制和删除文件，如下表所述。 </FONT><P><TABLE cellSpacing=0 cellPadding=5 width="87%" border=1><TBODY><TR vAlign=top bgColor=#dddddd><TD><FONT class=9v size=1><B>任务</B></FONT></TD><TD><FONT class=9v size=1><B>方法</B></FONT></TD></TR><TR vAlign=top><TD><FONT class=9v size=1>移动文件</FONT></TD><TD><FONT class=9v><FONT size=1><B>File.Move</B> 或 <B>FileSystemObject.MoveFile</B></FONT></FONT></TD></TR><TR vAlign=top><TD><FONT class=9v size=1>复制文件</FONT></TD><TD><FONT class=9v><FONT size=1><B>File.Copy</B> 或 <B>FileSystemObject.CopyFile</B></FONT></FONT></TD></TR><TR vAlign=top><TD><FONT class=9v size=1>删除文件</FONT></TD><TD><FONT class=9v><FONT size=1><B>File.Delete</B> 或 <B>FileSystemObject.DeleteFile</B></FONT></FONT></TD></TR></TBODY></TABLE><P><FONT size=1>请考察</FONT><A href="mk:@MSITStore:G:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\Rar$DI00.622\JSCRIPT5.CHM::/htm/sgFSOSample.htm#DeleteFile"><FONT size=1>示例代码</FONT></A><FONT size=1>，来领会在 <B>FileSystemObject</B> 中删除文件的两种方法。 </FONT><P><FONT size=1>下面的 VBScript 示例，在驱动器 C 的根目录中创建一个文本文件，向其中写一些信息，然后把它移动到 \tmp 目录中，并在 \temp 中做一个备份，最后把它们从两个目录中删掉。 </FONT><P><FONT size=1>要运行下面的示例，需要先在驱动器 C 的根目录中创建 \tmp 和 \temp 目录： </FONT><P><FONT size=1></FONT><BLOCKQUOTE><PRE><FONT class=9v face=" 宋体" size=1>Sub ManipFiles
  Dim fso, f1, f2, s
  Set fso = CreateObject("Scripting.FileSystemObject")
  Set f1 = fso.CreateTextFile("c:\testfile.txt", True)
  Response.Write "Writing file &lt;br&gt;"
  ' 写一行。
  f1.Write ("This is a test.")
  ' 关闭文件。
  f1.Close
  Response.Write "Moving file to c:\tmp &lt;br&gt;"
  ' 获取 C 的根目录(C:\)中的文件的句柄。
  Set f2 = fso.GetFile("c:\testfile.txt")
  ' 把文件移动到 \tmp 目录。
  f2.Move ("c:\tmp\testfile.txt")
  Response.Write "Copying file to c:\temp &lt;br&gt;"
  ' 把文件复制到 \temp 目录。
  f2.Copy ("c:\temp\testfile.txt")
  Response.Write "Deleting files &lt;br&gt;"
  ' 获得文件当前位置的句柄。
  Set f2 = fso.GetFile("c:\tmp\testfile.txt")
  Set f3 = fso.GetFile("c:\temp\testfile.txt")
  ' 删除文件。
  f2.Delete
  f3.Delete
  Response.Write "All done!"
End Sub
</FONT></PRE></BLOCKQUOTE><FONT size=1>下面的代码示范了在 JScript 中做同样的事： </FONT><P><BLOCKQUOTE><PRE><FONT class=9v face=" 宋体" size=1>function ManipFiles()
{
  var fso, f1, f2, s;
  fso = new ActiveXObject("Scripting.FileSystemObject");
  f1 = fso.CreateTextFile("c:\\testfile.txt", true);
  Response.Write("Writing file &lt;br&gt;");
  // 写一行。
  f1.Write("This is a test.");
  // 关闭文件。
  f1.Close();
  Response.Write("Moving file to c:\\tmp &lt;br&gt;");
  // 获取 C 的根目录(C:\)中的文件的句柄。
  f2 = fso.GetFile("c:\\testfile.txt");
  // 把文件移动到 \tmp 目录。
  f2.Move ("c:\\tmp\\testfile.txt");
  Response.Write("Copying file to c:\\temp &lt;br&gt;");
  // 把文件复制到 \temp 目录。
  f2.Copy ("c:\\temp\\testfile.txt");
  Response.Write("Deleting files &lt;br&gt;");
  // 获得文件当前位置的句柄。
  f2 = fso.GetFile("c:\\tmp\\testfile.txt");
  f3 = fso.GetFile("c:\\temp\\testfile.txt");
  // 删除文件。
  f2.Delete();
  f3.Delete();
  Response.Write("All done!");
}
</FONT></PRE></BLOCKQUOTE></BLOCKQUOTE></FONT></STRONG></PRE></BLOCKQUOTE></BLOCKQUOTE><img src ="http://www.blogjava.net/nayanliu/aggbug/5885.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/nayanliu/" target="_blank">楚客</a> 2005-06-10 15:07 <a href="http://www.blogjava.net/nayanliu/articles/5885.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>玩透弹出窗口</title><link>http://www.blogjava.net/nayanliu/articles/5882.html</link><dc:creator>楚客</dc:creator><author>楚客</author><pubDate>Fri, 10 Jun 2005 07:04:00 GMT</pubDate><guid>http://www.blogjava.net/nayanliu/articles/5882.html</guid><wfw:comment>http://www.blogjava.net/nayanliu/comments/5882.html</wfw:comment><comments>http://www.blogjava.net/nayanliu/articles/5882.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/nayanliu/comments/commentRss/5882.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/nayanliu/services/trackbacks/5882.html</trackback:ping><description><![CDATA[<FONT size=2>经常上网的朋友可能会到过这样一些网站，一进入首页立刻会弹出一个窗口，或者按一个连接或按钮弹出，通常在这个窗口里会显示一些注意事项、版权信息、警告、欢迎光顾之类的话或者作者想要特别提示的信息。其实制作这样的页面效果非常的容易，只要往该页面的HTML里加入几段Javascript代码即可实现。下面俺就带您剖析它的奥秘。 </FONT>
<P><FONT size=2>【1、最基本的弹出窗口代码】 </FONT></P>
<P><FONT size=2>其实代码非常简单： </FONT></P>
<P><FONT size=2>&lt;SCRIPT LANGUAGE="javascript"&gt; <BR>&lt;!-- <BR>window.open ('page.html') <BR>--&gt; <BR>&lt;/SCRIPT&gt; <BR>因为着是一段javascripts代码，所以它们应该放在&lt;SCRIPT LANGUAGE="javascript"&gt;标签和&lt;/script&gt;之间。&lt;!-- 和 --&gt;是对一些版本低的浏览器起作用，在这些老浏览器中不会将标签中的代码作为文本显示出来。要养成这个好习惯啊。 <BR>window.open ('page.html') 用于控制弹出新的窗口page.html，如果page.html不与主窗口在同一路径下，前面应写明路径，绝对路径(</FONT><A href="http://)/"><FONT size=2>http://)</FONT></A><FONT size=2>和相对路径(../)均可。用单引号和双引号都可以，只是不要混用。 <BR>这一段代码可以加入HTML的任意位置，&lt;head&gt;和&lt;/head&gt;之间可以，&lt;body&gt;间&lt;/body&gt;也可以，越前越早执行，尤其是页面代码长，又想使页面早点弹出就尽量往前放。 </FONT></P>
<P><BR><FONT size=2>【2、经过设置后的弹出窗口】 </FONT></P>
<P><FONT size=2>下面再说一说弹出窗口的设置。只要再往上面的代码中加一点东西就可以了。 <BR>我们来定制这个弹出的窗口的外观，尺寸大小，弹出的位置以适应该页面的具体情况。 <BR>&lt;SCRIPT LANGUAGE="javascript"&gt; <BR>&lt;!-- <BR>window.open ('page.html', 'newwindow', 'height=100, width=400, top=0,left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no') <BR></FONT><A href="file://写/"><FONT size=2>file://写</FONT></A><FONT size=2>成一行 <BR>--&gt; <BR>&lt;/SCRIPT&gt; <BR>参数解释： <BR>&lt;SCRIPT LANGUAGE="javascript"&gt; js脚本开始； <BR>window.open 弹出新窗口的命令； <BR>'page.html' 弹出窗口的文件名； <BR>'newwindow' 弹出窗口的名字（不是文件名），非必须，可用空''代替； <BR>height=100 窗口高度； <BR>width=400 窗口宽度； <BR>top=0 窗口距离屏幕上方的象素值； <BR>left=0 窗口距离屏幕左侧的象素值； <BR>toolbar=no 是否显示工具栏，yes为显示； <BR>menubar，scrollbars 表示菜单栏和滚动栏。 <BR>resizable=no 是否允许改变窗口大小，yes为允许； <BR>location=no 是否显示地址栏，yes为允许； <BR>status=no 是否显示状态栏内的信息（通常是文件已经打开），yes为允许； <BR>&lt;/SCRIPT&gt; js脚本结束 </FONT></P>
<P><BR><FONT size=2>【3、用函数控制弹出窗口】 </FONT></P>
<P><FONT size=2>下面是一个完整的代码。 <BR>&lt;html&gt; <BR>&lt;head&gt; <BR>&lt;script LANGUAGE="JavaScript"&gt; <BR>&lt;!-- <BR>function openwin() { window.open ("page.html", "newwindow", "height=100, width=400, toolbar= <BR>no, menubar=no, scrollbars=no, resizable=no, location=no, status=no") <BR></FONT><A href="file://写/"><FONT size=2>file://写</FONT></A><FONT size=2>成一行 <BR>} <BR></FONT><A href="file://--/"><FONT size=2>file://--</FONT></A><FONT size=2>&gt; <BR>&lt;/script&gt; <BR>&lt;/head&gt; <BR>&lt;body onload="openwin()"&gt; <BR>...任意的页面内容... <BR>&lt;/body&gt; <BR>&lt;/html&gt; <BR>这里定义了一个函数openwin(),函数内容就是打开一个窗口。在调用它之前没有任何用途。 <BR>怎么调用呢？ <BR>方法一：&lt;body onload="openwin()"&gt; 浏览器读页面时弹出窗口； <BR>方法二：&lt;body onunload="openwin()"&gt; 浏览器离开页面时弹出窗口； <BR>方法三：用一个连接调用： <BR>&lt;a href="#" onclick="openwin()"&gt;打开一个窗口&lt;/a&gt; <BR>注意：使用的“#”是虚连接。 <BR>方法四：用一个按钮调用： <BR>&lt;input type="button" onclick="openwin()" value="打开窗口"&gt; </FONT></P>
<P><FONT size=2>【4、同时弹出2个窗口】 </FONT></P>
<P><FONT size=2>对源代码稍微改动一下： <BR>&lt;script LANGUAGE="JavaScript"&gt; <BR>&lt;!-- <BR>function openwin() <BR>{ window.open ("page.html", "newwindow", "height=100, width=100, top=0,left=0,toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no") <BR></FONT><A href="file://写/"><FONT size=2>file://写</FONT></A><FONT size=2>成一行 <BR>window.open ("page2.html", "newwindow2", "height=100, width=100, top=100, left=100,toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no") <BR></FONT><A href="file://写/"><FONT size=2>file://写</FONT></A><FONT size=2>成一行 <BR>} <BR></FONT><A href="file://--/"><FONT size=2>file://--</FONT></A><FONT size=2>&gt; <BR>&lt;/script&gt; <BR>为避免弹出的2个窗口覆盖，用top和left控制一下弹出的位置不要相互覆盖即可。最后用上面说过的四种方法调用即可。 </FONT></P>
<P><FONT size=2>注意：2个窗口的name(newwindows和newwindow2)不要相同，或者干脆全部为空。OK？ </FONT></P>
<P><FONT size=2>【5、主窗口打开文件1.htm，同时弹出小窗口page.html】 </FONT></P>
<P><FONT size=2>如下代码加入主窗口&lt;head&gt;区： <BR>&lt;script language="javascript"&gt; <BR>&lt;!-- <BR>function openwin() <BR>{window.open("page.html","","width=200,height=200") <BR>} <BR></FONT><A href="file://--/"><FONT size=2>file://--</FONT></A><FONT size=2>&gt; <BR>&lt;/script&gt; <BR>加入&lt;body&gt;区： <BR>&lt;a href="1.htm" onclick="openwin()"&gt;open&lt;/a&gt;即可。 </FONT></P>
<P><FONT size=2>【6、弹出的窗口之定时关闭控制】 </FONT></P>
<P><FONT size=2>下面我们再对弹出的窗口进行一些控制，效果就更好了。如果我们再将一小段代码加入弹出的页面(注意是加入到page.html的HTML中，可不是主页面中，否则...)，让它10秒后自动关闭是不是更酷了？ </FONT></P>
<P><FONT size=2>首先，将如下代码加入page.html文件的&lt;head&gt;区： <BR>&lt;script language="JavaScript"&gt; <BR>function closeit() <BR>{setTimeout("self.close()",10000) </FONT><A href="file://毫/"><FONT size=2>file://毫</FONT></A><FONT size=2>秒} <BR>&lt;/script&gt; <BR>然后，再用&lt;body onload="closeit()"&gt; 这一句话代替page.html中原有的&lt;BODY&gt;这一句就可以了。(这一句话千万不要忘记写啊！这一句的作用是调用关闭窗口的代码，10秒钟后就自行关闭该窗口。) </FONT></P>
<P><FONT size=2>【7、在弹出窗口中加上一个关闭按钮】 </FONT></P>
<P><FONT size=2>&lt;FORM&gt; <BR>&lt;INPUT TYPE='BUTTON' VALUE='关闭' onClick='window.close()'&gt; <BR>&lt;/FORM&gt; <BR>呵呵，现在更加完美了！ </FONT></P>
<P><FONT size=2>【8、内包含的弹出窗口-一个页面两个窗口】 </FONT></P>
<P><FONT size=2>上面的例子都包含两个窗口，一个是主窗口，另一个是弹出的小窗口。 </FONT></P>
<P><FONT size=2>通过下面的例子，你可以在一个页面内完成上面的效果。 <BR>&lt;html&gt; <BR>&lt;head&gt; <BR>&lt;SCRIPT LANGUAGE="JavaScript"&gt; <BR>function openwin() <BR>{OpenWindow=window.open("", "newwin", "height=250, width=250,toolbar=no,scrollbars="+scroll+",menubar=no"); <BR></FONT><A href="file://写/"><FONT size=2>file://写</FONT></A><FONT size=2>成一行 <BR>OpenWindow.document.write("&lt;TITLE&gt;例子&lt;/TITLE&gt;") <BR>OpenWindow.document.write("&lt;BODY BGCOLOR=#ffffff&gt;") <BR>OpenWindow.document.write("&lt;h1&gt;Hello!&lt;/h1&gt;") <BR>OpenWindow.document.write("New window opened!") <BR>OpenWindow.document.write("&lt;/BODY&gt;") <BR>OpenWindow.document.write("&lt;/HTML&gt;") <BR>OpenWindow.document.close()} <BR>&lt;/SCRIPT&gt; <BR>&lt;/head&gt; <BR>&lt;body&gt; <BR>&lt;a href="#" onclick="openwin()"&gt;打开一个窗口&lt;/a&gt; <BR>&lt;input type="button" onclick="openwin()" value="打开窗口"&gt; <BR>&lt;/body&gt; <BR>&lt;/html&gt; <BR>看看 OpenWindow.document.write()里面的代码不就是标准的HTML吗？只要按照格式写更多的行即可。千万注意多一个标签或少一个标签就会出现错误。记得用OpenWindow.document.close()结束啊。 </FONT></P>
<P><FONT size=2>【9、终极应用--弹出的窗口之Cookie控制】 </FONT></P>
<P><FONT size=2>回想一下，上面的弹出窗口虽然酷，但是有一点小毛病(沉浸在喜悦之中，一定没有发现吧？)比如你将上面的脚本放在一个需要频繁经过的页面里(例如首页)，那么每次刷新这个页面，窗口都会弹出一次，是不是非常烦人？:-(有解决的办法吗？Yes! ;-) Follow me. </FONT></P>
<P><FONT size=2>我们使用cookie来控制一下就可以了。 </FONT></P>
<P><FONT size=2>首先，将如下代码加入主页面HTML的&lt;HEAD&gt;区： <BR>&lt;script&gt; <BR>function openwin() <BR>{window.open("page.html","","width=200,height=200")} <BR>function get_cookie(Name) <BR>{var search = Name + "=" <BR>var returnvalue = ""; <BR>if (document.cookie.length &gt; 0) { <BR>offset = document.cookie.indexOf(search) <BR>if (offset != -1) { <BR>offset += search.length <BR>end = document.cookie.indexOf(";", offset); <BR>if (end == -1) <BR>end = document.cookie.length; <BR>returnvalue=unescape(document.cookie.substring(offset,end)) <BR>} <BR>} <BR>return returnvalue; <BR>} <BR>function loadpopup(){ <BR>if (get_cookie('popped')==''){ <BR>openwin() <BR>document.cookie="popped=yes" <BR>} <BR>} <BR>&lt;/script&gt; <BR>然后，用&lt;body onload="loadpopup()"&gt;（注意不是openwin而是loadpop啊！）替换主页面中原有的&lt;BODY&gt;这一句即可。你可以试着刷新一下这个页面或重新进入该页面，窗口再也不会弹出了。真正的Pop-Only-Once！ </FONT></P>
<P><FONT size=2>写到这里弹出窗口的制作和应用技巧基本上算是完成了，俺也累坏了，一口气说了这么多，希望对正在制作网页的朋友有所帮助俺就非常欣慰了。 </FONT></P>
<P><FONT size=2>需要注意的是，JS脚本中的的大小写最好前后保持一致。 <BR></FONT></P><img src ="http://www.blogjava.net/nayanliu/aggbug/5882.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/nayanliu/" target="_blank">楚客</a> 2005-06-10 15:04 <a href="http://www.blogjava.net/nayanliu/articles/5882.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>关于字符串的几个有用函数</title><link>http://www.blogjava.net/nayanliu/articles/5881.html</link><dc:creator>楚客</dc:creator><author>楚客</author><pubDate>Fri, 10 Jun 2005 07:02:00 GMT</pubDate><guid>http://www.blogjava.net/nayanliu/articles/5881.html</guid><wfw:comment>http://www.blogjava.net/nayanliu/comments/5881.html</wfw:comment><comments>http://www.blogjava.net/nayanliu/articles/5881.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/nayanliu/comments/commentRss/5881.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/nayanliu/services/trackbacks/5881.html</trackback:ping><description><![CDATA[<SPAN id=ArticleContent1_ArticleContent1_lblContent><FONT size=2>&nbsp;</FONT>
<P><FONT size=2>1、测试字符串长度（中英文）</FONT></P>
<P><FONT size=2>function strLen(s)<BR>{<BR>&nbsp;var i,str1,str2,str3,nLen;<BR>&nbsp;str1 = s.value;<BR>&nbsp;nLen = 0;<BR>&nbsp;for(i=1;i&lt;=str1.length;i++)<BR>&nbsp;{<BR>&nbsp;&nbsp;str2=str1.substring(i-1,i)<BR>&nbsp;&nbsp;str3=escape(str2);<BR>&nbsp;&nbsp;if(str3.length&gt;3)<BR>&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;nLen = nLen + 2;<BR>&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;else<BR>&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;nLen = nLen + 1;<BR>&nbsp;&nbsp;&nbsp;}<BR>&nbsp;}<BR>&nbsp;return nLen;<BR>}<BR>2、替换</FONT></P>
<P><FONT size=2>function Replace(s1,s2,s3)<BR>{<BR>&nbsp;var len1 , len2 , i;<BR>&nbsp;var str1 , str2 ; <BR>&nbsp;str1 = s1;<BR>&nbsp;len1 = str1.length;<BR>&nbsp;len2 = s2.length;<BR>&nbsp;if (len2 &gt; len1)<BR>&nbsp;&nbsp;return s1;<BR>&nbsp;for (i=1;i&lt;= len1-len2+1 ; i++)<BR>&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;str2 = str1.substring(i-1,i-1+len2);<BR>&nbsp;&nbsp;&nbsp;if (str2 == s2)<BR>&nbsp;&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;str1 = str1.substring(0,i-1) + s3 + str1.substring(i+len2-1,len1 );<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;i = 0;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;len1 = str1.length;<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;return str1;<BR>}</FONT></P>
<P><FONT size=2>3、查找<BR>function Pos(s1,s2)<BR>{<BR>&nbsp;var len1 , len2 , i,flag;<BR>&nbsp;var str1 , str2 ; <BR>&nbsp;str1 = s1;<BR>&nbsp;len1 = str1.length;<BR>&nbsp;len2 = s2.length;<BR>&nbsp;if (len2==0 || len1==0)<BR>&nbsp;&nbsp;&nbsp;&nbsp; return 0;<BR>&nbsp;flag = false;<BR>&nbsp;if (len2 &gt; len1)<BR>&nbsp;&nbsp;return s1;<BR>&nbsp;for (i=1;i&lt;= len1-len2+1 ; i++)<BR>&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;str2 = str1.substring(i-1,i-1+len2);<BR>&nbsp;&nbsp;&nbsp;if (str2 == s2)<BR>&nbsp;&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;flag = true;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;if (flag)<BR>&nbsp;&nbsp;return i;<BR>&nbsp;else<BR>&nbsp;&nbsp;return 0;<BR>}</FONT></P></SPAN><img src ="http://www.blogjava.net/nayanliu/aggbug/5881.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/nayanliu/" target="_blank">楚客</a> 2005-06-10 15:02 <a href="http://www.blogjava.net/nayanliu/articles/5881.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>几个常用的日期函数</title><link>http://www.blogjava.net/nayanliu/articles/5879.html</link><dc:creator>楚客</dc:creator><author>楚客</author><pubDate>Fri, 10 Jun 2005 07:01:00 GMT</pubDate><guid>http://www.blogjava.net/nayanliu/articles/5879.html</guid><wfw:comment>http://www.blogjava.net/nayanliu/comments/5879.html</wfw:comment><comments>http://www.blogjava.net/nayanliu/articles/5879.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/nayanliu/comments/commentRss/5879.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/nayanliu/services/trackbacks/5879.html</trackback:ping><description><![CDATA[<FONT size=2>&nbsp;/* -- 计算两个字符(YYYY-MM-DD)的日期相隔天数 -- */<BR>function Date_Compare(asStartDate,asEndDate){<BR>&nbsp;var miStart = Date.parse(asStartDate.replace(/\-/g, '/'));<BR>&nbsp;var miEnd&nbsp;&nbsp; = Date.parse(asEndDate.replace(/\-/g, '/'));<BR>&nbsp;return (miEnd-miStart)/(1000*24*3600);<BR>}</FONT>
<P><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/*-- 判断一个字符串(YYYY-MM-DD)的日期是否正确 -- */<BR>function Date_istrue(asDate){<BR>&nbsp;var lsDate&nbsp; = asDate + "";<BR>&nbsp;var loDate&nbsp; = lsDate.split("-");<BR>&nbsp;if (loDate.length!=3) return false; <BR>&nbsp;var liYear&nbsp; = parseInt(loDate[0]);<BR>&nbsp;var liMonth = parseInt(loDate[1]);<BR>&nbsp;var liDay&nbsp;&nbsp; = parseInt(loDate[2]);<BR>&nbsp;if ((loDate[0].length&gt;4)||(loDate[1].length&gt;2)||(loDate[2].length&gt;2)) return false;<BR>&nbsp;if (isNaN(liYear)||isNaN(liMonth)||isNaN(liDay)) return false;<BR>&nbsp;if ((liYear&lt;1900)||(liYear&gt;3000)) return false;<BR>&nbsp;if ((liMonth&gt;12)||(liMonth&lt;=0))&nbsp;&nbsp; return false;<BR>&nbsp;if (Date_getDay(liYear,liMonth)&lt;liDay) return false;<BR>&nbsp;return !isNaN(Date.UTC(liYear,liMonth,liDay));<BR>}</FONT></P>
<P><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/*-- 返回某年某月的天数-- */<BR>function Date_getDay(aiYear,aiMonth){<BR>&nbsp;var loDay = [0,31,28,31,30,31,30,31,31,30,31,30,31];<BR>&nbsp;if (aiYear%4==0) loDay[2] = 29;<BR>&nbsp;return loDay[aiMonth];<BR>}</FONT></P><img src ="http://www.blogjava.net/nayanliu/aggbug/5879.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/nayanliu/" target="_blank">楚客</a> 2005-06-10 15:01 <a href="http://www.blogjava.net/nayanliu/articles/5879.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title> 在客户端用JAVASCRIPT或VBSCRIPT生成WORD文档</title><link>http://www.blogjava.net/nayanliu/articles/5878.html</link><dc:creator>楚客</dc:creator><author>楚客</author><pubDate>Fri, 10 Jun 2005 06:59:00 GMT</pubDate><guid>http://www.blogjava.net/nayanliu/articles/5878.html</guid><wfw:comment>http://www.blogjava.net/nayanliu/comments/5878.html</wfw:comment><comments>http://www.blogjava.net/nayanliu/articles/5878.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/nayanliu/comments/commentRss/5878.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/nayanliu/services/trackbacks/5878.html</trackback:ping><description><![CDATA[<FONT size=2><FONT face=宋体>因为用户要求所做系统有文档自动生成的功能，所以我被安排负责用</FONT><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">JAVA</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma; 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: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">WORD</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma; 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: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">BBS</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma; 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: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">Itsyh</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma; 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: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">Itsyh</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma; 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: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体"><A href="http://www.itpub.net/">http://www.itpub.net/</A></SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma; 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: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">JAVA</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma; 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: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">jakarta</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma; 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: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">POI</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma; 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: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">JAVA</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma; 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: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">WORD</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma; 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: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">http://jakarta.apache.org/poi/index.html</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma; 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: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">POI</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">的文档，我看呀！看呀！终于咱傻了。</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体"> </SPAN></FONT><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体"><BR><BR></SPAN><SPAN class=javascript><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">&nbsp;&nbsp; 因为在</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">POI</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma; 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: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">EXCEL</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma; 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: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">HSSF</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma; 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: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">WORD</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma; 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: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">HDF</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma; 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: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">jakarta</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma; 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: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">We are looking for developers!!! If you are interested in helping with HDF familiarize yourself with the source code and just start coding. Make sure you read the guidelines for getting involved </SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma; 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: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">POI</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">了，于是就想到了在客户端生成应该没有这么复杂吧！</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体"> </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体"><BR><BR></SPAN><SPAN class=javascript><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">&nbsp;&nbsp;&nbsp; 终于熬了一晚，在同事的热心教导下，偶终于完成了用</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">JAVASCRIPT</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma; 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: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">VBSCRIPT</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma; 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: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">WORD</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma; 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: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">WORD</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma; 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: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">WORD</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">一个晚上），虽然有浏览器安全警告上的问题，但是使用的还不错。</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体"> </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体"><BR><BR></SPAN><SPAN class=javascript><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma; 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: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">OFFICE </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体"><BR><BR></SPAN><SPAN class=javascript><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">下面我就把代码给大家参考一下，希望大家以后能用到。</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体"> </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体"><BR><BR></SPAN><SPAN class=javascript><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma; 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: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">WORD</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">文档，我使用的文字型窗体区域的功能，所有区域定义好以后有个名字，也就是我要替换的名字。（替换内容长度可以不献呀！）</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体"> </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体"><BR><SPAN class=javascript>VBSCRIPT</SPAN></SPAN><SPAN class=javascript><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">代码：</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体"> </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体"><BR><SPAN class=javascript>&lt;SCRIPT LANGUAGE="vbscript"&gt; </SPAN><BR><SPAN class=javascript>function word_onclick() </SPAN><BR><SPAN class=javascript>&nbsp;&nbsp;Set myDocApp = CreateObject("Word.Application") </SPAN><BR><SPAN class=javascript>&nbsp;&nbsp;myDocApp.Visible = True </SPAN><BR><SPAN class=javascript>&nbsp;&nbsp;myDocApp.Activate </SPAN><BR><SPAN class=javascript>&nbsp;&nbsp;set myDoc = myDocApp.Documents.Open("http://localhost/test/test.doc")&nbsp;&nbsp; </SPAN><BR><SPAN class=javascript>&nbsp;&nbsp;str = word_proc.textarea.value </SPAN><BR><SPAN class=javascript>&nbsp;&nbsp;myDoc.FormFields("test").Range = str </SPAN><BR><SPAN class=javascript>&nbsp;&nbsp; </SPAN><BR><SPAN class=javascript>end function </SPAN><BR><SPAN class=javascript>&lt;/SCRIPT&gt; </SPAN><BR><BR><SPAN class=javascript>JAVASCRIPT</SPAN></SPAN><SPAN class=javascript><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">代码：</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体"> </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体"><BR><SPAN class=javascript>&lt;SCRIPT LANGUAGE="javascript"&gt; </SPAN><BR><SPAN class=javascript>function word_onclick() </SPAN><BR><SPAN class=javascript>{ </SPAN><BR><SPAN class=javascript>&nbsp;&nbsp;var myDocApp =new ActiveXObject("word.Application"); </SPAN><BR><SPAN class=javascript>&nbsp;&nbsp;myDocApp.visible = true; </SPAN><BR><SPAN class=javascript>&nbsp;&nbsp;myDocApp.activate(); </SPAN><BR><SPAN class=javascript>&nbsp;&nbsp;var myDoc = myDocApp.documents.open("http://localhost/test/test.doc");&nbsp;&nbsp; </SPAN><BR><SPAN class=javascript>&nbsp;&nbsp;var str = word_proc.textarea.value; </SPAN><BR><SPAN class=javascript>&nbsp;&nbsp;myDoc.formFields("test").range = str; </SPAN><BR><SPAN class=javascript>&nbsp;&nbsp; </SPAN><BR><SPAN class=javascript>} </SPAN><BR><SPAN class=javascript>&lt;/SCRIPT&gt; </SPAN><BR><BR><SPAN class=javascript>WORD</SPAN></SPAN><SPAN class=javascript><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">文档看附件</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体"> </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体"><BR><BR></SPAN><SPAN class=javascript><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma; 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: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">:D</SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体"><BR style="mso-special-character: line-break"></SPAN><img src ="http://www.blogjava.net/nayanliu/aggbug/5878.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/nayanliu/" target="_blank">楚客</a> 2005-06-10 14:59 <a href="http://www.blogjava.net/nayanliu/articles/5878.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title> "打开,另存为,属性,打印"等14个JS代码 </title><link>http://www.blogjava.net/nayanliu/articles/5877.html</link><dc:creator>楚客</dc:creator><author>楚客</author><pubDate>Fri, 10 Jun 2005 06:58:00 GMT</pubDate><guid>http://www.blogjava.net/nayanliu/articles/5877.html</guid><wfw:comment>http://www.blogjava.net/nayanliu/comments/5877.html</wfw:comment><comments>http://www.blogjava.net/nayanliu/articles/5877.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/nayanliu/comments/commentRss/5877.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/nayanliu/services/trackbacks/5877.html</trackback:ping><description><![CDATA[<FONT size=2><FONT color=#a9a9a9><SPAN id=ArticleContent1_ArticleContent1_lblContent>■打开■&nbsp;<BR>&lt;input&nbsp;name=Button&nbsp;onClick=document.all.WebBrowser.ExecWB(1,1)&nbsp;type=button&nbsp;value=打开&gt;&nbsp;<BR>&lt;OBJECT&nbsp;classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2&nbsp;height=0&nbsp;id=WebBrowser&nbsp;width=0&gt;&lt;/OBJECT&gt;&nbsp;<BR>■另存为■&nbsp;<BR>&lt;input&nbsp;name=Button&nbsp;onClick=document.all.WebBrowser.ExecWB(4,1)&nbsp;type=button&nbsp;value=另存为&gt;&lt;OBJECT&nbsp;classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2&nbsp;height=0&nbsp;id=WebBrowser&nbsp;width=0&gt;&lt;/OBJECT&gt;&nbsp;<BR>■属性■&nbsp;<BR>&lt;input&nbsp;name=Button&nbsp;onClick=document.all.WebBrowser.ExecWB(10,1)&nbsp;type=button&nbsp;value=属性&gt;&lt;OBJECT&nbsp;classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2&nbsp;height=0&nbsp;id=WebBrowser&nbsp;width=0&gt;&lt;/OBJECT&gt;&nbsp;<BR>■打印■&nbsp;<BR>&lt;input&nbsp;name=Button&nbsp;onClick=document.all.WebBrowser.ExecWB(6,1)&nbsp;type=button&nbsp;value=打印&gt;&lt;OBJECT&nbsp;classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2&nbsp;height=0&nbsp;id=WebBrowser&nbsp;width=0&gt;&lt;/OBJECT&gt;&nbsp;<BR>■页面设置■&nbsp;<BR>&lt;input&nbsp;name=Button&nbsp;onClick=document.all.WebBrowser.ExecWB(8,1)&nbsp;type=button&nbsp;value=页面设置&gt;&lt;OBJECT&nbsp;classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2&nbsp;height=0&nbsp;id=WebBrowser&nbsp;width=0&gt;&lt;/OBJECT&gt;&nbsp;<BR>■刷新■&nbsp;<BR>&lt;input&nbsp;type=button&nbsp;value=刷新&nbsp;name=refresh&nbsp;onclick="window.location.reload()"&gt;&nbsp;<BR>■导入收藏■&nbsp;<BR>&lt;input&nbsp;type="button"&nbsp;name="Button"&nbsp;value="导入收藏夹"&nbsp;onClick=window.external.ImportExportFavorites(true,);&gt;&nbsp;<BR>■导出收藏■&nbsp;<BR>&lt;input&nbsp;type="button"&nbsp;name="Button3"&nbsp;value="导出收藏夹"&nbsp;onClick=window.external.ImportExportFavorites(false,);&gt;&nbsp;<BR>■加入收藏■&nbsp;<BR>&lt;INPUT&nbsp;name=Button2&nbsp;onclick="window.external.AddFavorite(location.href,&nbsp;document.title)"&nbsp;type=button&nbsp;value=加入收藏夹&gt;&nbsp;<BR>■整理收藏夹■&nbsp;<BR>&lt;INPUT&nbsp;name=Submit2&nbsp;onclick="window.external.ShowBrowserUI(OrganizeFavorites,&nbsp;null)"&nbsp;type=button&nbsp;value=整理收藏夹&gt;&nbsp;<BR>■查看原文件■&nbsp;<BR>&lt;INPUT&nbsp;name=Button&nbsp;onclick=window.location&nbsp;=&nbsp;"view-source:"&nbsp;+&nbsp;window.location.href&nbsp;type=button&nbsp;value=查看源文件&gt;&nbsp;<BR>■语言设置■&nbsp;<BR>&lt;INPUT&nbsp;name=Button&nbsp;onclick="window.external.ShowBrowserUI(LanguageDialog,&nbsp;null)"&nbsp;type=button&nbsp;value=语言设置&gt;&nbsp;<BR>■前进■&nbsp;<BR>&lt;INPUT&nbsp;name=Submit&nbsp;onclick=history.go(1)&nbsp;type=submit&nbsp;value=前进&gt;&nbsp;<BR>■后退■&nbsp;<BR>&lt;INPUT&nbsp;name=Submit2&nbsp;onclick=history.go(-1)&nbsp;type=submit&nbsp;value=后退&gt;</SPAN> <BR></FONT></FONT><img src ="http://www.blogjava.net/nayanliu/aggbug/5877.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/nayanliu/" target="_blank">楚客</a> 2005-06-10 14:58 <a href="http://www.blogjava.net/nayanliu/articles/5877.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>showModalDialog()、showModelessDialog()方法使用详解</title><link>http://www.blogjava.net/nayanliu/articles/5875.html</link><dc:creator>楚客</dc:creator><author>楚客</author><pubDate>Fri, 10 Jun 2005 06:49:00 GMT</pubDate><guid>http://www.blogjava.net/nayanliu/articles/5875.html</guid><wfw:comment>http://www.blogjava.net/nayanliu/comments/5875.html</wfw:comment><comments>http://www.blogjava.net/nayanliu/articles/5875.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/nayanliu/comments/commentRss/5875.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/nayanliu/services/trackbacks/5875.html</trackback:ping><description><![CDATA[<FONT size=2>Javascript有许多内建的方法来产生对话框，如：window.alert(), window.confirm(),window.prompt().等。 然而IE提供更多的方法支持对话框。如：</FONT>
<P><FONT size=2>　　showModalDialog() (IE 4+ 支持)<BR>　　showModelessDialog() (IE 5+ 支持)</FONT></P>
<P><BR><FONT size=2>&nbsp;window.showModalDialog()方法用来创建一个显示HTML内容的模态对话框，由于是对话框，因此它并没有一般用window.open()打开的窗口的所有属性。<BR>&nbsp;window.showModelessDialog()方法用来创建一个显示HTML内容的非模态对话框。</FONT></P>
<P><FONT size=2>&nbsp;当我们用showModelessDialog()打开窗口时，不必用window.close()去关闭它，当以非模态方式［IE5］打开时， 打开对话框的窗口仍可以进行其他的操作，即对话框不总是最上面的焦点，当打开它的窗口ＵＲＬ改变时，它自动关闭。而模态［ＩＥ４］方式的对话框始终有焦点（焦点不可移走，直到它关闭）。模态对话框和打开它的窗口相联系，因此我们打开另外的窗口时，他们的链接关系依然保存，并且隐藏在活动窗口的下面。</FONT></P>
<P><FONT size=2>使用方法如下：<BR>&nbsp;vReturnValue = window.showModalDialog(sURL [, vArguments] [, sFeatures])<BR>&nbsp;vReturnValue = window.showModelessDialog(sURL [, vArguments] [, sFeatures])<BR>参数说明：<BR>&nbsp;sURL<BR>&nbsp;必选参数，类型：字符串。用来指定对话框要显示的文档的URL。<BR>&nbsp;vArguments<BR>&nbsp;可选参数，类型：变体。用来向对话框传递参数。传递的参数类型不限，包括数组等。对话框通过window.dialogArguments来取得传递进来的参数。<BR>&nbsp;sFeatures<BR>&nbsp;可选参数，类型：字符串。用来描述对话框的外观等信息，可以使用以下的一个或几个，用分号“;”隔开。<BR>&nbsp;&nbsp;dialogHeight 对话框高度，不小于１００px，ＩＥ４中dialogHeight 和 dialogWidth 默认的单位是em，而ＩＥ５中是px，为方便其见，在定义modal方式的对话框时，用px做单位。<BR>&nbsp;　　dialogWidth: 对话框宽度。<BR>&nbsp;　　dialogLeft: 距离桌面左的距离。<BR>&nbsp;　　dialogTop: 离桌面上的距离。<BR>&nbsp;　　center: {yes | no | 1 | 0 }：窗口是否居中，默认yes，但仍可以指定高度和宽度。<BR>&nbsp;　　help: {yes | no | 1 | 0 }：是否显示帮助按钮，默认yes。<BR>&nbsp;　　resizable: {yes | no | 1 | 0 } ［ＩＥ５＋］：是否可被改变大小。默认no。<BR>&nbsp;　　status: {yes | no | 1 | 0 } ［IE5+］：是否显示状态栏。默认为yes[ Modeless]或no[Modal]。<BR>&nbsp;&nbsp;scroll:{ yes | no | 1 | 0 | on | off }：指明对话框是否显示滚动条。默认为yes。</FONT></P>
<P><FONT size=2>&nbsp;&nbsp;还有几个属性是用在HTA中的，在一般的网页中一般不使用。<BR>&nbsp;&nbsp;dialogHide:{ yes | no | 1 | 0 | on | off }：在打印或者打印预览时对话框是否隐藏。默认为no。<BR>&nbsp;&nbsp;edge:{ sunken | raised }：指明对话框的边框样式。默认为raised。<BR>&nbsp;&nbsp;unadorned:{ yes | no | 1 | 0 | on | off }：默认为no。</FONT></P>
<P><FONT size=2>&nbsp;传入参数：<BR>&nbsp;要想对话框传递参数，是通过vArguments来进行传递的。类型不限制，对于字符串类型，最大为4096个字符。也可以传递对象，例如：</FONT></P>
<P><FONT size=2>&nbsp;test1.htm<BR>&nbsp;====================<BR>&nbsp;&lt;script&gt;<BR>&nbsp;&nbsp;var mxh1 = new Array("mxh","net_lover","孟子E章")<BR>&nbsp;&nbsp;var mxh2 = window.open("about:blank","window_mxh")<BR>&nbsp;&nbsp;// 向对话框传递数组<BR>&nbsp;&nbsp;window.showModalDialog("test2.htm",mxh1)<BR>&nbsp;&nbsp;// 向对话框传递window对象<BR>&nbsp;&nbsp;window.showModalDialog("test3.htm",mxh2)<BR>&nbsp;&lt;/script&gt;</FONT></P>
<P><FONT size=2>&nbsp;test2.htm<BR>&nbsp;====================<BR>&nbsp;&lt;script&gt;<BR>&nbsp;&nbsp;var a = window.dialogArguments<BR>&nbsp;&nbsp;alert("您传递的参数为：" + a)<BR>&nbsp;&lt;/script&gt;</FONT></P>
<P><FONT size=2>&nbsp;test3.htm<BR>&nbsp;====================<BR>&nbsp;&lt;script&gt;<BR>&nbsp;&nbsp;var a = window.dialogArguments<BR>&nbsp;&nbsp;alert("您传递的参数为window对象，名称：" + a.name)<BR>&nbsp;&lt;/script&gt;</FONT></P>
<P><FONT size=2>&nbsp;可以通过window.returnValue向打开对话框的窗口返回信息，当然也可以是对象。例如：</FONT></P>
<P><FONT size=2>&nbsp;test4.htm<BR>&nbsp;===================<BR>&nbsp;&lt;script&gt;<BR>&nbsp;&nbsp;var a = window.showModalDialog("test5.htm")<BR>&nbsp;&nbsp;for(i=0;i&lt;a.length;i++) alert(a[i])<BR>&nbsp;&lt;/script&gt;</FONT></P>
<P><FONT size=2>&nbsp;test5.htm<BR>&nbsp;===================<BR>&nbsp;&lt;script&gt;<BR>&nbsp;function sendTo()<BR>&nbsp;{<BR>&nbsp;&nbsp;var a=new Array("a","b")<BR>&nbsp;&nbsp;window.returnValue = a<BR>&nbsp;&nbsp;window.close()<BR>&nbsp;}<BR>&nbsp;&lt;/script&gt;<BR>&nbsp;&lt;body&gt;<BR>&nbsp;&lt;form&gt;<BR>&nbsp;&nbsp;&lt;input value="返回" type=button onclick="sendTo()"&gt;<BR>&nbsp;&lt;/form&gt;</FONT></P>
<P><FONT size=2>&nbsp;常见问题：<BR>&nbsp;1，如何在模态对话框中进行提交而不新开窗口？<BR>&nbsp;如果你 的 浏览器是IE5.5+,可以在对话框中使用带name属性的iframe，提交时可以制定target为该iframe的name。对于IE4+，你可以用高度为0的frame来作：例子，</FONT></P>
<P><FONT size=2>&nbsp;test6.htm<BR>&nbsp;===================<BR>&nbsp;&lt;script&gt;<BR>&nbsp;&nbsp;window.showModalDialog("test7.htm")<BR>&nbsp;&lt;/script&gt;</FONT></P>
<P><FONT size=2>&nbsp;test7.htm<BR>&nbsp;===================<BR>&nbsp;if(window.location.search) alert(window.location.search)<BR>&nbsp;&lt;frameset rows="0,*"&gt;<BR>&nbsp;&nbsp;&lt;frame src="about:blank"&gt;<BR>&nbsp;&nbsp;&lt;frame src="test8.htm"&gt;<BR>&nbsp;&lt;/frameset&gt;</FONT></P>
<P><FONT size=2>&nbsp;test8.htm<BR>&nbsp;===================<BR>&nbsp;&lt;form target="_self" method="get"&gt;<BR>&nbsp;&lt;input name=txt value="test"&gt;<BR>&nbsp;&lt;input type=submit&gt;<BR>&nbsp;&lt;/form&gt;<BR>&nbsp;&lt;script&gt;<BR>&nbsp;if(window.location.search) alert(window.location.search)<BR>&nbsp;&lt;/script&gt;<BR>&nbsp;2,可以通过</FONT><A href="http://servername/virtualdirname/test.htm?name=mxh"><FONT size=2>http://servername/virtualdirname/test.htm?name=mxh</FONT></A><FONT size=2>方式直接向对话框传递参数吗？<BR>&nbsp;答案是不能。但在frame里是可以的。</FONT></P><img src ="http://www.blogjava.net/nayanliu/aggbug/5875.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/nayanliu/" target="_blank">楚客</a> 2005-06-10 14:49 <a href="http://www.blogjava.net/nayanliu/articles/5875.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>利用xml数据岛实现多级关联下拉选择框的做法</title><link>http://www.blogjava.net/nayanliu/articles/5874.html</link><dc:creator>楚客</dc:creator><author>楚客</author><pubDate>Fri, 10 Jun 2005 06:46:00 GMT</pubDate><guid>http://www.blogjava.net/nayanliu/articles/5874.html</guid><wfw:comment>http://www.blogjava.net/nayanliu/comments/5874.html</wfw:comment><comments>http://www.blogjava.net/nayanliu/articles/5874.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/nayanliu/comments/commentRss/5874.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/nayanliu/services/trackbacks/5874.html</trackback:ping><description><![CDATA[<SPAN id=ArticleContent1_ArticleContent1_lblContent><FONT size=2>&nbsp;</FONT>
<P><FONT size=2>&lt;select name=year&gt;&lt;/select&gt;<BR>&lt;select name=month&gt;&lt;/select&gt;<BR>&lt;select name=date&gt;&lt;/select&gt;<BR>&lt;select name=clock&gt;&lt;/select&gt;<BR>&lt;input name=result&gt;</FONT></P>
<P><FONT size=2>&lt;script&gt;<BR>var arrSel=["year","month","date","clock"];//arrSel定义了要修改的下拉框和xml数据的节点名称<BR>&lt;/script&gt;</FONT></P>
<P><FONT size=2>&lt;xml id=xmldata&gt;<BR>&nbsp;&lt;xmldata&gt;<BR>&nbsp;&nbsp;&lt;year value="2000"&gt;<BR>&nbsp;&nbsp;&nbsp;&lt;month value="4"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;date value="14"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;clock value="一点" /&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;clock value="三点" /&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/date&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;date value="17"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;clock value="一点" /&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/date&gt;<BR>&nbsp;&nbsp;&nbsp;&lt;/month&gt;<BR>&nbsp;&nbsp;&nbsp;&lt;month value="5"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;date value="15"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;clock value="一点" /&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;clock value="四点" /&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;clock value="七点" /&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/date&gt;<BR>&nbsp;&nbsp;&nbsp;&lt;/month&gt;<BR>&nbsp;&nbsp;&lt;/year&gt;<BR>&nbsp;&nbsp;&lt;year value="2001"&gt;<BR>&nbsp;&nbsp;&nbsp;&lt;month value="7"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;date value="16"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;clock value="一点" /&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;clock value="五点" /&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;clock value="九点" /&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/date&gt;<BR>&nbsp;&nbsp;&nbsp;&lt;/month&gt;<BR>&nbsp;&nbsp;&lt;/year&gt;<BR>&nbsp;&lt;/xmldata&gt;<BR>&lt;/xml&gt;</FONT></P>
<P><FONT size=2>&lt;script&gt;<BR>function qswhXml(num){<BR>/******* by qiushuiwuhen(2002-5-17) ********/<BR>&nbsp;var i,j,arrTemp=[];<BR>&nbsp;for(i=0;i&lt;num;i++)arrTemp[i]=document.all(arrSel[i]).options[document.all(arrSel[i]).selectedIndex].text<BR>&nbsp;if(num==arrSel.length){//这里处理最后的数据。<BR>&nbsp;&nbsp;document.all("result").value="选中了("+arrTemp+")";return;<BR>&nbsp;}<BR>&nbsp;with(document.all(arrSel[num])){<BR>&nbsp;&nbsp;length=0<BR>&nbsp;&nbsp;var obj=document.all.xmldata.XMLDocument.childNodes[0];<BR>&nbsp;&nbsp;for(i=0;i&lt;num;i++)obj=obj.selectSingleNode(arrSel[i]+'[@value="'+arrTemp[i]+'"]');<BR>&nbsp;&nbsp;for(i=0;i&lt;obj.childNodes.length;i++)options[length++].text=obj.childNodes[i].getAttribute("value");<BR>&nbsp;&nbsp;onchange=new Function("qswhXml("+(num+1)+")");<BR>&nbsp;&nbsp;onchange();<BR>&nbsp;}<BR>}<BR>qswhXml(0);<BR>&lt;/script&gt;</FONT></P></SPAN><img src ="http://www.blogjava.net/nayanliu/aggbug/5874.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/nayanliu/" target="_blank">楚客</a> 2005-06-10 14:46 <a href="http://www.blogjava.net/nayanliu/articles/5874.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>用数据岛生成翻页程序 </title><link>http://www.blogjava.net/nayanliu/articles/5873.html</link><dc:creator>楚客</dc:creator><author>楚客</author><pubDate>Fri, 10 Jun 2005 06:42:00 GMT</pubDate><guid>http://www.blogjava.net/nayanliu/articles/5873.html</guid><wfw:comment>http://www.blogjava.net/nayanliu/comments/5873.html</wfw:comment><comments>http://www.blogjava.net/nayanliu/articles/5873.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/nayanliu/comments/commentRss/5873.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/nayanliu/services/trackbacks/5873.html</trackback:ping><description><![CDATA[<P><FONT size=2>&lt;html&gt;</FONT></P>
<P><FONT size=2>&lt;head&gt;<BR>&lt;title&gt;Tree walk test - JScript&lt;/title&gt;<BR>&lt;style&gt;body&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { font-family: 宋体; font-size: 9pt }<BR>.first&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { color: gray; text-decoration: none }<BR>.later&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { cursor: hand; color: red; text-decoration: none }<BR>&lt;/style&gt;<BR>&lt;meta name="GENERATOR" content="Microsoft FrontPage 4.0"&gt;<BR>&lt;meta name="ProgId" content="FrontPage.Editor.Document"&gt;<BR>&lt;/head&gt;</FONT></P>
<P><FONT size=2>&lt;!--<BR>配置说明:width控制当前列的宽度;sortBy排序指向下面的data的tagname;sortType为排序类型,目前支持三种:text,date,number,<BR>也可实现自己的类型,只要修改sort函数就可了<BR>--&gt;<BR>&lt;XML ID="head"&gt;<BR>&lt;xmldata&gt;<BR>&nbsp; &lt;username width="150" sortBy="username" sortType="text"&gt;用户名&lt;/username&gt;<BR>&nbsp; &lt;pw width="150" sortBy="pw" sortType="number"&gt;密码&lt;/pw&gt;<BR>&nbsp; &lt;date width="200" sortBy="date" sortType="date"&gt;日期&lt;/date&gt;<BR>&lt;/xmldata&gt;<BR>&lt;/XML&gt;<BR>&lt;!--<BR>配置说明:isShow,控制此处内容是否显示;isKey是否是主键,1是且内容会在theValue里面显示,0否;<BR>--&gt;<BR>&lt;XML ID="data"&gt;<BR>&lt;xmldata&gt;<BR>&lt;row&gt;<BR>&nbsp; &lt;id isShow="0" isKey="1"&gt;1&lt;/id&gt;<BR>&nbsp; &lt;username isShow="1" isKey="1"&gt;fmzhang1&lt;/username&gt;<BR>&nbsp; &lt;pw&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; isShow="1" isKey="1"&gt;1&lt;/pw&gt;<BR>&nbsp; &lt;date&nbsp;&nbsp;&nbsp;&nbsp; isShow="1" isKey="0"&gt;2003-3-3&lt;/date&gt;<BR>&lt;/row&gt;<BR>&lt;row&gt;<BR>&nbsp; &lt;id isShow="0" isKey="1"&gt;2&lt;/id&gt;<BR>&nbsp; &lt;username isShow="1" isKey="1"&gt;fmzhang11&lt;/username&gt;<BR>&nbsp; &lt;pw&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; isShow="1" isKey="1"&gt;1&lt;/pw&gt;<BR>&nbsp; &lt;date&nbsp;&nbsp;&nbsp;&nbsp; isShow="1" isKey="0"&gt;2003-3-3&lt;/date&gt;<BR>&lt;/row&gt;<BR>&lt;row&gt;<BR>&nbsp; &lt;id isShow="0" isKey="1"&gt;3&lt;/id&gt;<BR>&nbsp; &lt;username isShow="1" isKey="1"&gt;fmzhang2&lt;/username&gt;<BR>&nbsp; &lt;pw&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; isShow="1" isKey="1"&gt;2&lt;/pw&gt;<BR>&nbsp; &lt;date&nbsp;&nbsp;&nbsp;&nbsp; isShow="1" isKey="0"&gt;2003-3-7&lt;/date&gt;<BR>&lt;/row&gt;<BR>&lt;row&gt;<BR>&nbsp; &lt;id isShow="0" isKey="1"&gt;4&lt;/id&gt;<BR>&nbsp; &lt;username isShow="1" isKey="1"&gt;fmzhang3&lt;/username&gt;<BR>&nbsp; &lt;pw&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; isShow="1" isKey="1"&gt;3&lt;/pw&gt;<BR>&nbsp; &lt;date&nbsp;&nbsp;&nbsp;&nbsp; isShow="1" isKey="0"&gt;2003-5-3&lt;/date&gt;<BR>&lt;/row&gt;<BR>&lt;row&gt;<BR>&nbsp; &lt;id isShow="0" isKey="1"&gt;5&lt;/id&gt;<BR>&nbsp; &lt;username isShow="1" isKey="1"&gt;fmzhang4&lt;/username&gt;<BR>&nbsp; &lt;pw&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; isShow="1" isKey="1"&gt;4&lt;/pw&gt;<BR>&nbsp; &lt;date&nbsp;&nbsp;&nbsp;&nbsp; isShow="1" isKey="0"&gt;2002-3-3&lt;/date&gt;<BR>&lt;/row&gt;<BR>&lt;row&gt;<BR>&nbsp; &lt;id isShow="0" isKey="1"&gt;6&lt;/id&gt;<BR>&nbsp; &lt;username isShow="1" isKey="1"&gt;fmzhang5&lt;/username&gt;<BR>&nbsp; &lt;pw&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; isShow="1" isKey="1"&gt;5&lt;/pw&gt;<BR>&nbsp; &lt;date&nbsp;&nbsp;&nbsp;&nbsp; isShow="1" isKey="0"&gt;2003-1-3&lt;/date&gt;<BR>&lt;/row&gt;<BR>&lt;row&gt;<BR>&nbsp; &lt;id isShow="0" isKey="1"&gt;7&lt;/id&gt;<BR>&nbsp; &lt;username isShow="1" isKey="1"&gt;fmzhang6&lt;/username&gt;<BR>&nbsp; &lt;pw&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; isShow="1" isKey="1"&gt;6&lt;/pw&gt;<BR>&nbsp; &lt;date&nbsp;&nbsp;&nbsp;&nbsp; isShow="1" isKey="0"&gt;2005-1-3&lt;/date&gt;<BR>&lt;/row&gt;<BR>&lt;row&gt;<BR>&nbsp; &lt;id isShow="0" isKey="1"&gt;8&lt;/id&gt;<BR>&nbsp; &lt;username isShow="1" isKey="1"&gt;fmzhang7&lt;/username&gt;<BR>&nbsp; &lt;pw&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; isShow="1" isKey="1"&gt;7&lt;/pw&gt;<BR>&nbsp; &lt;date&nbsp;&nbsp;&nbsp;&nbsp; isShow="1" isKey="0"&gt;2003-5-3&lt;/date&gt;<BR>&lt;/row&gt;<BR>&lt;row&gt;<BR>&nbsp; &lt;id isShow="0" isKey="1"&gt;9&lt;/id&gt;<BR>&nbsp; &lt;username isShow="1" isKey="1"&gt;fmzhang8&lt;/username&gt;<BR>&nbsp; &lt;pw&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; isShow="1" isKey="1"&gt;8&lt;/pw&gt;<BR>&nbsp; &lt;date&nbsp;&nbsp;&nbsp;&nbsp; isShow="1" isKey="0"&gt;2003-1-8&lt;/date&gt;<BR>&lt;/row&gt;<BR>&lt;row&gt;<BR>&nbsp; &lt;id isShow="0" isKey="1"&gt;10&lt;/id&gt;<BR>&nbsp; &lt;username isShow="1" isKey="1"&gt;fmzhang9&lt;/username&gt;<BR>&nbsp; &lt;pw&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; isShow="1" isKey="1"&gt;9&lt;/pw&gt;<BR>&nbsp; &lt;date&nbsp;&nbsp;&nbsp;&nbsp; isShow="1" isKey="0"&gt;2003-11-3&lt;/date&gt;<BR>&lt;/row&gt;<BR>&lt;/xmldata&gt;<BR>&lt;/XML&gt;<BR>&lt;body id="objbody" onload="show('first')"&gt;</FONT></P>
<P><FONT size=2>&lt;div id="mydiv"&gt;<BR>&lt;/div&gt;<BR>&lt;table border="0" cellpadding="2" width="57%"&gt;<BR>&nbsp; &lt;tr&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;td width="13%"&gt;&lt;input type="button" value="首页" onclick="show('first')"&gt;&lt;/td&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;td width="14%"&gt;&lt;input type="button" value="上一页" onclick="show('prov')"&gt;&lt;/td&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;td width="35%"&gt;&lt;input type="button" value="下一页" onclick="show('next')"&gt;&lt;/td&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;td width="14%"&gt;&lt;input type="button" value="最后一页" onclick="show('last')"&gt;&lt;/td&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;td width="40%"&gt;&lt;input type="text" size="5" maxlength="5" name="pageNum" value onkeydown="if(event.keyCode==13) goPageNum()" onkeyup="value=value.replace(/[^\d]/g,'')" onblur="value=value.replace(/[^\d]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"&gt;&lt;input type="button" value="go" onclick="goPageNum()"&gt;&lt;/td&gt;<BR>&nbsp; &lt;/tr&gt;<BR>&nbsp; &lt;tr&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;td width="13%"&gt;用户名&lt;/td&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;td width="14%"&gt;&lt;input type="text" name="xm" size="10" value&gt;&lt;/td&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;td width="35%" nowrap onclick="if(isResult.checked==true) isResult.checked=false;else if(isResult.checked==false) isResult.checked=true"&gt;&lt;input type="checkbox" name="isResult" onclick="if(this.checked==true) this.checked=false;else this.checked=true;" value="ON"&gt;在当前结果中查找&lt;/td&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;td width="54%" colspan="2"&gt;&lt;input type="button" name="search" onclick="search()" value="查找" size="10"&gt;&lt;/td&gt;<BR>&nbsp; &lt;/tr&gt;<BR>&lt;/table&gt;<BR>&lt;table border="0" cellpadding="2" width="100%"&gt;<BR>&lt;/table&gt;<BR>&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;<BR>&lt;table id="tableSec"&gt;<BR>&nbsp; &lt;tr&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;td&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!--<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 添加自己的按钮<BR>&nbsp;&nbsp;&nbsp; --&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;input type="button" value="此处添加自定义按钮" onclick="yourFunction()"&gt;&lt;/td&gt;<BR>&nbsp; &lt;/tr&gt;<BR>&lt;/table&gt;</FONT></P>
<P><FONT size=2>&lt;/body&gt;</FONT></P>
<P><FONT size=2>&lt;/html&gt;<BR>&lt;script&gt;<BR>//下面为初始化参数<BR>&nbsp;var datanodes=data.documentElement.childNodes;<BR>&nbsp;//下面三行保存副本,供删除以后恢复<BR>&nbsp;var xmlDoc=document.all("data").XMLDocument;<BR>&nbsp;var xmlDocTemp=new ActiveXObject("MSXML.DOMDocument");<BR>&nbsp;xmlDocTemp.appendChild(xmlDoc.documentElement.cloneNode(true));<BR>&nbsp;<BR>&nbsp;var totalrow=datanodes.length;//总数据行数<BR>&nbsp;var pagerow=4;//每页行数<BR>&nbsp;var totalpage=0;//总页数<BR>&nbsp;if(totalrow!=0) {<BR>&nbsp;&nbsp; if(totalrow%pagerow!=0) totalpage=parseInt(totalrow/pagerow)+1;<BR>&nbsp;&nbsp; else totalpage=parseInt(totalrow/pagerow);<BR>&nbsp;}<BR>&nbsp;var currPage=1;//当前页码<BR>&nbsp;var checkArr=new Array();//是否选中<BR>&nbsp;var theValueArr=new Array();//记录选中记录的checkbox的value值<BR>&nbsp;for(var i=0;i&lt;totalrow;i++)<BR>&nbsp;{<BR>&nbsp;&nbsp; checkArr[i]=0;//记录选中的记录0为未选中,1为选中,初始为0<BR>&nbsp;&nbsp; theValueArr[i]="";<BR>&nbsp;}<BR>&nbsp;var buildArr=new Array();//保存当前页要生成的记录序号<BR>&nbsp;var sortOrder='asce';//保存升序还是降序<BR>&nbsp; <BR>&nbsp;mydiv.innerText="一共"+totalpage+"页"+totalrow+"条记录,当前为第1页,当前选中0条记录";<BR>&nbsp;var nodes=head.documentElement.childNodes;<BR>&nbsp;var nodeslen=nodes.length;<BR>&nbsp;var attributes=head.documentElement.firstChild.attributes;<BR>&nbsp;var objform=document.createElement("&lt;FORM name='fjcl'&gt;");<BR>&nbsp;var objtable=document.createElement("&lt;TABLE bordercolor='#1EC600' border='1'&gt;"); <BR>&nbsp;var objtbody=document.createElement("TBODY");<BR>&nbsp;objtable.appendChild(objtbody);<BR>&lt;/script&gt;<BR>&lt;script language="javascript"&gt;<BR>//生成表格头部<BR>function addHead()<BR>{<BR>&nbsp;var objtr=document.createElement("&lt;TR&nbsp; bgColor='#FFCCCC'&gt;");<BR>&nbsp;objtbody.appendChild(objtr);<BR>&nbsp;var objtd=document.createElement("TD");<BR>&nbsp;objtd.width="20";<BR>&nbsp;objtd.innerText=" ";<BR>&nbsp;objtr.appendChild(objtd);<BR>&nbsp;for(var i=0;i&lt;nodeslen;i++)<BR>&nbsp;{<BR>&nbsp;&nbsp; var objtd=document.createElement("&lt;TD onclick='' onmousemove=''&gt;");<BR>&nbsp;&nbsp; objtd.width=head.documentElement.childNodes.item(i).getAttribute("width");<BR>&nbsp;&nbsp; objtd.onmousemove="style.cursor='hand'";<BR>&nbsp;&nbsp; var sortBy=head.documentElement.childNodes.item(i).getAttribute("sortBy");<BR>&nbsp;&nbsp; var sortType=head.documentElement.childNodes.item(i).getAttribute("sortType");<BR>&nbsp;&nbsp; objtd.onclick="sort('"+sortBy+"','"+sortType+"','"+i+"')";<BR>&nbsp;&nbsp; var tdtext=nodes.item(i).text+"→";<BR>&nbsp;&nbsp; var objtext=document.createTextNode(tdtext);<BR>&nbsp;&nbsp; objtd.appendChild(objtext);<BR>&nbsp;&nbsp; objtr.appendChild(objtd);<BR>&nbsp;}<BR>&nbsp;objform.appendChild(objtable);<BR>&nbsp;objbody.appendChild(objform);<BR>&nbsp;objbody.appendChild(tableSec);<BR>}<BR>//添加符合条件的记录<BR>function addAll()<BR>{<BR>&nbsp; var childdatanodes=data.documentElement.childNodes.item(0).childNodes;<BR>&nbsp; var childtotalrow=childdatanodes.length;//每行下面可能的数据项长度<BR>&nbsp; for(var i=0;i&lt;buildArr.length;i++)<BR>&nbsp; {<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; var objtr;<BR>&nbsp;&nbsp;&nbsp; if(i%2==0)<BR>&nbsp;&nbsp;&nbsp; { <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; objtr=document.createElement("&lt;TR onmouseover='' bgColor='#80FF80'&nbsp; class='first' onclick='changeColor()' &gt;");<BR>&nbsp;&nbsp;&nbsp; }else<BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; objtr=document.createElement("&lt;TR onmouseover='' bgColor='#FFFF80'&nbsp; class='first' onclick='changeColor()' &gt;");<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; if(checkArr[buildArr[i]-1]==1) objtr.className="later";<BR>&nbsp;&nbsp;&nbsp; objtr.onmouseover="style.cursor='hand'";<BR>&nbsp;&nbsp;&nbsp; var thetd=document.createElement("TD");<BR>&nbsp;&nbsp;&nbsp; var objCheckBox;<BR>&nbsp;&nbsp;&nbsp; if(checkArr[buildArr[i]-1]==0) <BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; objCheckBox=document.createElement("&lt;input type='CHECKBOX' name='rad' value='' onclick=''&gt;");<BR>&nbsp;&nbsp;&nbsp; }else<BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; objCheckBox=document.createElement("&lt;input type='CHECKBOX' name='rad' value='' onclick='' checked&gt;");<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; objCheckBox.onclick=objCheckBox.onclick+";if(this.checked==true) checkArr["+parseInt(buildArr[i]-1)+"]='1';else checkArr["+parseInt(buildArr[i]-1)+"]=0";<BR>&nbsp;&nbsp;&nbsp; thetd.appendChild(objCheckBox);<BR>&nbsp;&nbsp;&nbsp; objtr.appendChild(thetd);<BR>&nbsp;&nbsp;&nbsp; for(var j=0;j&lt;childtotalrow;j++)<BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var isShow=datanodes.item(buildArr[i]-1).childNodes.item(j).getAttribute("isShow");//是否显示<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var isKey=datanodes.item(buildArr[i]-1).childNodes.item(j).getAttribute("isKey");&nbsp; //是否是主键<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(isShow=='1')//isShow=1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var objtd=document.createElement("&lt;TD onclick=''&gt;");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var tdtext=document.createTextNode(datanodes.item(buildArr[i]-1).childNodes.item(j).text);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; objtd.appendChild(tdtext);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; objtr.appendChild(objtd);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; objtd.onclick=objCheckBox.click;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(isKey=='1')<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(objCheckBox.value=="")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; objCheckBox.value=objCheckBox.value+datanodes.item(buildArr[i]-1).childNodes.item(j).tagName+"="+datanodes.item(buildArr[i]-1).childNodes.item(j).text;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; objCheckBox.value=objCheckBox.value+"&amp;"+datanodes.item(buildArr[i]-1).childNodes.item(j).tagName+"="+datanodes.item(buildArr[i]-1).childNodes.item(j).text;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; theValueArr[buildArr[i]-1]=objCheckBox.value;<BR>&nbsp;&nbsp;&nbsp; objtbody.appendChild(objtr);<BR>&nbsp; }<BR>&nbsp; objform.appendChild(objtable);<BR>&nbsp; objbody.appendChild(objform);<BR>&nbsp; objbody.appendChild(tableSec);<BR>}<BR>//翻页按钮操作<BR>function show(thePage)<BR>{<BR>&nbsp; if(totalrow==0)<BR>&nbsp; {<BR>&nbsp;&nbsp; del();<BR>&nbsp;&nbsp; addHead();<BR>&nbsp;&nbsp; return false;<BR>&nbsp;&nbsp; }<BR>&nbsp; if(thePage=="first")<BR>&nbsp; {<BR>&nbsp;&nbsp;&nbsp; del();<BR>&nbsp;&nbsp;&nbsp; addHead();<BR>&nbsp;&nbsp;&nbsp;&nbsp; buildArr=new Array();<BR>&nbsp;&nbsp;&nbsp; if(totalrow&gt;=pagerow){<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for(var i=1;i&lt;=pagerow;i++)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; buildArr[i-1]=i;<BR>&nbsp;&nbsp;&nbsp; }else{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for(var i=1;i&lt;=totalrow;i++)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; buildArr[i-1]=i;<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; addAll();<BR>&nbsp;&nbsp;&nbsp; currPage=1;<BR>&nbsp; }else if(thePage=="prov")<BR>&nbsp; {<BR>&nbsp;&nbsp;&nbsp; if(currPage==1) return false;<BR>&nbsp;&nbsp;&nbsp; del();<BR>&nbsp;&nbsp;&nbsp; addHead();<BR>&nbsp;&nbsp;&nbsp; buildArr=new Array();<BR>&nbsp;&nbsp;&nbsp; for(var i=1;i&lt;=pagerow;i++){<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; buildArr[i-1]=(currPage-2)*pagerow+i;<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; addAll();<BR>&nbsp;&nbsp;&nbsp; currPage=currPage-1;<BR>&nbsp; }else if(thePage=="next")<BR>&nbsp; {<BR>&nbsp;&nbsp;&nbsp; if(currPage==totalpage) return false;<BR>&nbsp;&nbsp;&nbsp; del();<BR>&nbsp;&nbsp;&nbsp; addHead();<BR>&nbsp;&nbsp;&nbsp; buildArr=new Array();<BR>&nbsp;&nbsp;&nbsp; if((currPage+1)*pagerow&gt;=totalrow){<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for(var i=1;i&lt;=totalrow-currPage*pagerow;i++)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; buildArr[i-1]=currPage*pagerow+i;<BR>&nbsp;&nbsp;&nbsp; }else {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for(var i=1;i&lt;=pagerow;i++)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; buildArr[i-1]=currPage*pagerow+i;<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp;&nbsp; addAll();<BR>&nbsp;&nbsp;&nbsp; currPage=currPage+1;<BR>&nbsp; }else if(thePage=="last")<BR>&nbsp; {<BR>&nbsp;&nbsp;&nbsp; if(currPage==totalpage) return false; <BR>&nbsp;&nbsp;&nbsp; del();<BR>&nbsp;&nbsp;&nbsp; addHead();<BR>&nbsp;&nbsp;&nbsp; buildArr=new Array();<BR>&nbsp;&nbsp;&nbsp; if(totalrow%pagerow==0){<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for(var i=1;i&lt;=pagerow;i++)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; buildArr[i-1]=totalrow-pagerow+i;<BR>&nbsp;&nbsp;&nbsp; }else{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for(var i=1;i&lt;=totalrow%pagerow;i++)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; buildArr[i-1]=totalrow-totalrow%pagerow+i;<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; addAll();<BR>&nbsp;&nbsp;&nbsp; currPage=totalpage;<BR>&nbsp; }<BR>&nbsp; changeMyDiv();<BR>}<BR>//删除objform下面的所有内容<BR>function del()<BR>{<BR>&nbsp;objform.removeNode(true);<BR>&nbsp;objform=document.createElement("&lt;FORM name='fjcl'&gt;");<BR>&nbsp;objtable=document.createElement("&lt;TABLE bordercolor='#1EC600' border='1'&gt;"); <BR>&nbsp;objtbody=document.createElement("TBODY");<BR>&nbsp;objtable.appendChild(objtbody);<BR>}<BR>//改变颜色<BR>function changeColor()<BR>{<BR>&nbsp;for(var i=0;i&lt;objtbody.childNodes.length-1;i++)<BR>&nbsp;{<BR>&nbsp;&nbsp; var theRow=buildArr[i]-1;<BR>&nbsp;&nbsp; if(checkArr[theRow]==0)<BR>&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp; objtbody.childNodes.item(i+1).className="first";<BR>&nbsp;&nbsp; }<BR>&nbsp;&nbsp; else<BR>&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp; objtbody.childNodes.item(i+1).className="later";<BR>&nbsp;&nbsp; }&nbsp; <BR>&nbsp;}<BR>&nbsp;changeMyDiv();<BR>}<BR>function changeMyDiv()<BR>{<BR>&nbsp;var totalChecked=0;//记录当前选中记录数<BR>&nbsp;for(var i=0;i&lt;totalrow;i++)<BR>&nbsp;{<BR>&nbsp;&nbsp; if(checkArr[i]==1) totalChecked+=1;<BR>&nbsp;}<BR>&nbsp;mydiv.innerText="一共"+totalpage+"页"+totalrow+"条记录,当前为第"+currPage+"页,当前选中"+totalChecked+"条记录"; <BR>}</FONT></P>
<P><FONT size=2>function showValue()<BR>{<BR>&nbsp; var str="";<BR>&nbsp; var str2="";<BR>&nbsp; for(var i=0;i&lt;totalrow;i++)<BR>&nbsp; {<BR>&nbsp;&nbsp;&nbsp; str+=checkArr[i]+";";<BR>&nbsp;&nbsp;&nbsp; if(checkArr[i]==1) str2+=theValueArr[i]+";";<BR>&nbsp; }<BR>&nbsp; alert(str);<BR>&nbsp; alert(str2);<BR>}<BR>//跳转到某个页<BR>function goPageNum()<BR>{<BR>&nbsp; var page=pageNum.value;<BR>&nbsp; if(totalrow==0)<BR>&nbsp; {<BR>&nbsp;&nbsp;&nbsp; alert("没有可操作的记录!");<BR>&nbsp;&nbsp;&nbsp; return false;<BR>&nbsp; }<BR>&nbsp; if(page.length==0)<BR>&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp; alert("请输入要跳转的页码!");<BR>&nbsp;&nbsp;&nbsp;&nbsp; return false;<BR>&nbsp; }<BR>&nbsp; if(parseInt(page)==0||parseInt(page)&gt;totalpage)<BR>&nbsp; {<BR>&nbsp;&nbsp;&nbsp; alert("输入页码应介于1和"+totalpage+"之间!");<BR>&nbsp;&nbsp;&nbsp; return false;<BR>&nbsp; } <BR>&nbsp; if(page==currPage) return false;&nbsp; <BR>&nbsp; if(page==1)<BR>&nbsp; {<BR>&nbsp;&nbsp;&nbsp; show('first');<BR>&nbsp; }else if(page==totalpage)<BR>&nbsp; {<BR>&nbsp;&nbsp;&nbsp; show('last');<BR>&nbsp; }else<BR>&nbsp; {<BR>&nbsp;&nbsp;&nbsp; del();<BR>&nbsp;&nbsp;&nbsp; addHead();<BR>&nbsp;&nbsp;&nbsp; buildArr=new Array();<BR>&nbsp;&nbsp;&nbsp; for(var i=0;i&lt;pagerow;i++){<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; buildArr[i]=(page-1)*pagerow+i+1;<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; addAll();<BR>&nbsp;&nbsp;&nbsp; currPage=page;<BR>&nbsp; }<BR>&nbsp; changeMyDiv();<BR>}<BR>function yourFunction()<BR>{<BR>&nbsp; if(totalrow==0)<BR>&nbsp; {<BR>&nbsp;&nbsp;&nbsp; alert("没有可操作的记录!");<BR>&nbsp;&nbsp;&nbsp; return false;<BR>&nbsp; }<BR>&nbsp; var totalChecked=0;//记录当前选中记录数<BR>&nbsp; for(var i=0;i&lt;totalrow;i++)<BR>&nbsp; {<BR>&nbsp;&nbsp;&nbsp; if(checkArr[i]==1) totalChecked+=1;<BR>&nbsp; }<BR>&nbsp; if(totalChecked==0)<BR>&nbsp; {<BR>&nbsp;&nbsp;&nbsp; alert("没有选中记录,请选择后进行操作!");<BR>&nbsp;&nbsp;&nbsp; return false;<BR>&nbsp; }<BR>&nbsp; var pk='';<BR>&nbsp; for(var i=0;i&lt;totalrow;i++)<BR>&nbsp; {<BR>&nbsp;&nbsp;&nbsp; if(checkArr[i]==1)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pk+=theValueArr[i]+";";<BR>&nbsp; }<BR>&nbsp; alert(pk);<BR>&nbsp; &lt;!--<BR>&nbsp; //&nbsp; 此处添加你要的操作<BR>&nbsp; --&gt;<BR>}<BR>&lt;/script&gt;<BR>&lt;script&gt;<BR>//以下实现对不同数据类型进行排序<BR>//比较两个字符串<BR>function compare_text(text1,text2)<BR>{<BR>&nbsp; if(text1&gt;text2) return 1;<BR>&nbsp; else return 0;<BR>}<BR>//比较两个数字的大小(按浮点数)<BR>function compare_number(number1,number2)<BR>{<BR>&nbsp; if(parseFloat(number1)&gt;parseFloat(number2)) return 1;<BR>&nbsp; else return 0;<BR>}<BR>//比较两个日期的大小<BR>function compare_date(kssj,jssj)<BR>{<BR>&nbsp; var kssjArr=kssj.split("-");<BR>&nbsp; var jssjArr=jssj.split("-");<BR>&nbsp; var date1=new Date(kssjArr[0],kssjArr[1],kssjArr[2]);<BR>&nbsp; var date2=new Date(jssjArr[0],jssjArr[1],jssjArr[2]);<BR>&nbsp; if(date1&gt;date2) return 1;<BR>&nbsp; else return 0;<BR>}<BR>&lt;/script&gt;<BR>&lt;script&gt;<BR>//点击排序按钮时执行此函数<BR>function sort(sortBy,sortType,sortNum)<BR>{<BR>if(data.documentElement.childNodes.length==0) return false;<BR>&nbsp; var sortByArr=new Array();<BR>&nbsp; for(var i=0;i&lt;buildArr.length;i++){<BR>&nbsp;&nbsp;&nbsp; sortByArr[i]=datanodes.item(buildArr[i]-1).getElementsByTagName(sortBy).item(0).text;<BR>&nbsp; }&nbsp; <BR>&nbsp; if(sortOrder=='asce') {&nbsp;&nbsp; //升序<BR>&nbsp;&nbsp;&nbsp; for(var i=0;i&lt;buildArr.length;i++){<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for(var j=0;j&lt;buildArr.length-1;j++){<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var tempArr;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var tempSort;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(sortType=='text'){<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(compare_text(sortByArr[j],sortByArr[j+1])==1){<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tempArr=sortByArr[j];sortByArr[j]=sortByArr[j+1];sortByArr[j+1]=tempArr;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tempSort=buildArr[j];buildArr[j]=buildArr[j+1];buildArr[j+1]=tempSort;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }else if(sortType=='number'){<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(compare_number(sortByArr[j],sortByArr[j+1])==1){<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tempArr=sortByArr[j];sortByArr[j]=sortByArr[j+1];sortByArr[j+1]=tempArr;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tempSort=buildArr[j];buildArr[j]=buildArr[j+1];buildArr[j+1]=tempSort;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }else if(sortType=='date'){<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(compare_date(sortByArr[j],sortByArr[j+1])==1){<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tempArr=sortByArr[j];sortByArr[j]=sortByArr[j+1];sortByArr[j+1]=tempArr;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tempSort=buildArr[j];buildArr[j]=buildArr[j+1];buildArr[j+1]=tempSort;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; sortOrder="desc";<BR>&nbsp; } else if(sortOrder=='desc'){&nbsp; //降序<BR>&nbsp;&nbsp;&nbsp; for(var i=0;i&lt;buildArr.length;i++){<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for(var j=0;j&lt;buildArr.length-1;j++){<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var tempArr;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var tempSort;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(sortType=='text'){<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(compare_text(sortByArr[j],sortByArr[j+1])==0){<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tempArr=sortByArr[j];sortByArr[j]=sortByArr[j+1];sortByArr[j+1]=tempArr;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tempSort=buildArr[j];buildArr[j]=buildArr[j+1];buildArr[j+1]=tempSort;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }else if(sortType=='number'){<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(compare_number(sortByArr[j],sortByArr[j+1])==0){<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tempArr=sortByArr[j];sortByArr[j]=sortByArr[j+1];sortByArr[j+1]=tempArr;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tempSort=buildArr[j];buildArr[j]=buildArr[j+1];buildArr[j+1]=tempSort;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }else if(sortType=='date'){<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(compare_date(sortByArr[j],sortByArr[j+1])==0){<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tempArr=sortByArr[j];sortByArr[j]=sortByArr[j+1];sortByArr[j+1]=tempArr;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tempSort=buildArr[j];buildArr[j]=buildArr[j+1];buildArr[j+1]=tempSort;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; sortOrder="asce";<BR>&nbsp; }<BR>&nbsp;&nbsp;&nbsp; del();<BR>&nbsp;&nbsp;&nbsp; addHead();<BR>&nbsp;&nbsp;&nbsp; addAll();<BR>&nbsp;&nbsp;&nbsp; if(sortOrder=="asce"){<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; objtable.rows[0].cells[parseInt(sortNum)+1].innerText=nodes.item(parseInt(sortNum)).text+"↓";<BR>&nbsp;&nbsp;&nbsp; }else{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; objtable.rows[0].cells[parseInt(sortNum)+1].innerText=nodes.item(parseInt(sortNum)).text+"↑";<BR>&nbsp;&nbsp;&nbsp; }<BR>}<BR>//在原有结果中查找时也删除data的所有node,然后把xmlDocTemp的所有node复制到data里面<BR>function delAllNode()<BR>{<BR>&nbsp; var len=datanodes.length;<BR>&nbsp; for(var i=0;i&lt;len;i++)<BR>&nbsp; {<BR>&nbsp;&nbsp;&nbsp; datanodes.item(i).parentNode.removeChild(datanodes.item(i));<BR>&nbsp;&nbsp;&nbsp; i-=1;<BR>&nbsp;&nbsp;&nbsp; len-=1;<BR>&nbsp; }<BR>}<BR>//此函数实现在结果中查找符合条件的记录<BR>function search()<BR>{<BR>&nbsp; if(isResult.checked==false)<BR>&nbsp; {<BR>&nbsp;&nbsp;&nbsp; delAllNode();<BR>&nbsp;&nbsp;&nbsp; var xmlDocTempLen=xmlDocTemp.documentElement.childNodes.length;<BR>&nbsp;&nbsp;&nbsp; for(var i=0;i&lt;xmlDocTempLen;i++)<BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; data.documentElement.appendChild(xmlDocTemp.documentElement.childNodes.item(i).cloneNode(true));&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; datanodes=data.documentElement.childNodes;<BR>&nbsp;&nbsp; <BR>&nbsp; }<BR>&nbsp; var nodeLen=datanodes.length;<BR>&nbsp; for(var i=0;i&lt;nodeLen;i++)<BR>&nbsp; {<BR>&nbsp;&nbsp;&nbsp; if(!isShow(i)) //不符合条件的删除<BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; datanodes.item(i).parentNode.removeChild(datanodes.item(i));<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; i-=1;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nodeLen-=1;<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp; }<BR>&nbsp;<BR>&nbsp;totalrow=datanodes.length;//总数据行数<BR>&nbsp;totalpage=0;//总页数<BR>&nbsp;if(totalrow!=0) {<BR>&nbsp;&nbsp; if(totalrow%pagerow!=0) totalpage=parseInt(totalrow/pagerow)+1;<BR>&nbsp;&nbsp; else totalpage=parseInt(totalrow/pagerow);<BR>&nbsp;}<BR>&nbsp;currPage=1;//当前页码<BR>&nbsp;checkArr=new Array();//是否选中<BR>&nbsp;theValueArr=new Array();//记录选中记录的checkbox的value值<BR>&nbsp;for(var i=0;i&lt;totalrow;i++)<BR>&nbsp;{<BR>&nbsp;&nbsp; checkArr[i]=0;//记录选中的记录0为未选中,1为选中,初始为0<BR>&nbsp;&nbsp; theValueArr[i]="";<BR>&nbsp;}<BR>&nbsp;buildArr=new Array();//保存当前页要生成的记录序号<BR>&nbsp;sortOrder='asce';//保存升序还是降序 <BR>&nbsp;mydiv.innerText="一共"+totalpage+"页"+totalrow+"条记录,当前为第1页,当前选中0条记录";<BR>&nbsp;show('first');<BR>}<BR>//下面这个函数需要你自己实现,符合条件的记录(要显示)返回true,否则返回false<BR>function isShow(nodeNo)<BR>{</FONT></P>
<P><FONT size=2>&nbsp; var myxm=xm.value;<BR>&nbsp; var temp=datanodes.item(nodeNo).getElementsByTagName("username");<BR>&nbsp; if(temp.item(0).text.indexOf(myxm)!=-1) return true;<BR>&nbsp; return false;</FONT></P>
<P><FONT size=2>}<BR>&lt;/script&gt;</FONT></P><img src ="http://www.blogjava.net/nayanliu/aggbug/5873.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/nayanliu/" target="_blank">楚客</a> 2005-06-10 14:42 <a href="http://www.blogjava.net/nayanliu/articles/5873.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>让你的网页更精彩 - Javascript 调用MSAgent --Merlin</title><link>http://www.blogjava.net/nayanliu/articles/5872.html</link><dc:creator>楚客</dc:creator><author>楚客</author><pubDate>Fri, 10 Jun 2005 06:35:00 GMT</pubDate><guid>http://www.blogjava.net/nayanliu/articles/5872.html</guid><wfw:comment>http://www.blogjava.net/nayanliu/comments/5872.html</wfw:comment><comments>http://www.blogjava.net/nayanliu/articles/5872.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/nayanliu/comments/commentRss/5872.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/nayanliu/services/trackbacks/5872.html</trackback:ping><description><![CDATA[<P><FONT size=1>（本文假设您使用WindowsXP或Windows2000操作系统） 不知在你漫游互联网时可曾在他开某个网页时看到一个小巫师，蓝色的袍子上满是金黄的星星和月亮十分可爱。他会向你问好，给你介绍这个网站。你一定<IMG height=131 src="http://dev.csdn.net/Develop/ArticleImages/18/18339/CSDN_Dev_Image_2003-5-92111341.GIF" width=135 align=left>奇怪，那个巫师是怎么做出来的。其实他并不是网页实现的而是微软的一个ActiveXObject 叫Microsoft Agent。今天，我们来讨论如何在你的网页中加入这个可爱的Agent(他叫Merlin)。 </FONT></P>
<P><FONT size=1>Microsoft Agent的官方角色除了WindowsXP和2000自带的巫师Merlin,还有需要从http://www.microsoft.com/msagent/downloads/user.asp#character下载的附加界色。他们是瓶中妖怪Genie(还记得那首歌吗），鹦鹉Peedy和机器人Robby。下载后的文件是exe文件，直接运行就可以完成安装了。</FONT></P>
<P><FONT size=1>在我们的网页里可以通过Javascript调用Agent.Control.2来装载我们的Agent。具体方法如下：</FONT></P><PRE class=prog><FONT size=1>    var chName;
    var agent; 
    var ch;
    chName = "Merlin";
    agent = new ActiveXObject("Agent.Control.2"); 
    agent.Connected = true; 
    agent.Characters.Load(chName,chName+".acs"); 
    ch = agent.Characters(chName);</FONT></PRE>
<H3><FONT size=1>代码解释：</FONT></H3>
<UL>
<LI class=chkli><FONT size=1><SPAN class=chkli>chName 是我们要用的角色的名字，因为多出要使用它，所以把它保存成字符型变量了，这里我们把它定义成了"Merlin"。</SPAN> </FONT>
<LI class=chkli><FONT size=1>agent 为Agent.Control.2指定一个对象变量 </FONT>
<LI class=chkli><FONT size=1>agent.Connected = true 用来启动于Microsoft Agent的连接 </FONT>
<LI class=chkli><FONT size=1>agent.Characters.Load() 读入要使用的角色，他有两个参数，第一个是角色的姓名，第二个是角色存储的文件。 </FONT>
<UL>
<LI><FONT size=1>这里顺便说一下，Microsoft Agent角色都保存在Windows目录下的MSAgent文件夹中的chars文件夹内。一般情况下其文件名与角色名是相同的角色文件的扩展名是.acs。 </FONT></LI></UL>
<LI class=chkli><FONT size=1>ch = agent.Characters() 让ch成为角色的操纵变量，以后我们只要操纵ch就可以让我们的角色作出各种动作了。比如我们要使用Speak行为就输入ch.Speak("Hello"); </FONT>
<LI class=chkli><FONT size=1>这部分代码基本上就是个模板，应用时Copy&amp;Paste就Ok了 </FONT></LI></UL>
<P><FONT size=1>好了，现在我们角色已经读入了内存。接下来我们来讨论一些常用基本角色行为。</FONT></P>
<H3><FONT size=1>基本角色行为(以merlin为例)</FONT></H3>
<P><FONT size=1>show() 使角色显示在屏幕上。刚刚创建的角色是不能自己现实出来的必须调用show()函数。</FONT></P>
<P><FONT size=1>hide() 相对于show()的函数，用来让角色从屏幕上隐藏起来(并不从内存中删除)</FONT></P>
<P><FONT size=1>speak(words) 让我们的角色"说话",words的内容会显示在一个语言气球内，words为字符串</FONT></P>
<P><FONT size=1>think(words) words的内容会显示在一个思考气球内，words为字符串</FONT></P>
<P><FONT size=1>moveto(x,y) 移动到屏幕的(x,y)位置</FONT></P>
<P><FONT size=1>play(ani) 使用角色动画ani为字符串。其值可以为</FONT></P>
<TABLE cellSpacing=2 cellPadding=2 width="75%" border=0>
<TBODY>
<TR class=lightbk>
<TD>
<DIV align=center><FONT size=1>Announce</FONT></DIV></TD>
<TD>
<DIV align=center><FONT size=1>Explain</FONT></DIV></TD>
<TD>
<DIV align=center><FONT size=1>Congratulate</FONT></DIV></TD>
<TD>
<DIV align=center><FONT size=1>DontRecongnize</FONT></DIV></TD></TR>
<TR class=lightbk>
<TD>
<DIV align=center><FONT size=1>Gesturedown</FONT></DIV></TD>
<TD>
<DIV align=center><FONT size=1>Gestureleft</FONT></DIV></TD>
<TD>
<DIV align=center><FONT size=1>Gestureright</FONT></DIV></TD>
<TD>
<DIV align=center><FONT size=1>Gestureup</FONT></DIV></TD></TR>
<TR class=lightbk>
<TD>
<DIV align=center><FONT size=1>Greet</FONT></DIV></TD>
<TD>
<DIV align=center><FONT size=1>Pleased</FONT></DIV></TD>
<TD>
<DIV align=center><FONT size=1>Read</FONT></DIV></TD>
<TD>
<DIV align=center><FONT size=1>Surprised</FONT></DIV></TD></TR>
<TR class=lightbk>
<TD>
<DIV align=center><FONT size=1>Idel1_1到Ideal1_4</FONT></DIV></TD>
<TD>
<DIV align=center><FONT size=1>Idel2_1和Idel2_2 </FONT></DIV></TD>
<TD>
<DIV align=center><FONT size=1></FONT></DIV></TD>
<TD>
<DIV align=center><FONT size=1></FONT></DIV></TD></TR></TBODY></TABLE>
<P><FONT size=1></FONT>&nbsp;</P>
<P><FONT size=1>这里仅仅给出关于Merlin的一部分，具体动画指令可参看MSDN的Microsoft Agent Animations for ....里的内容，没有MSDN的朋友也可以到Microsoft的网站去下载agent的帮助文件。</FONT></P>
<P><FONT size=1>好了，介绍到这里Microsoft agent最简单的应用就已经讲完了，下面来看一个例子吧。</FONT></P>
<H3><FONT size=1>程序事例</FONT></H3><PRE class=prog><FONT size=1>&lt;html&gt;
&lt;body&gt;
&lt;script&gt;
var chName;
var agent;
var Merlin;
chName = "Merlin"; 
agent = new ActiveXObject("Agent.Control.2"); 
agent.Connected = true; agent.Characters.Load(chName,chName+".acs"); 
Merlin = agent.Characters(chName); Merlin.MoveTo(200,200); Merlin.Show(); 
Merlin.Play("Announce");
Merlin.Speak("欢迎来到detrox的个人主页"); 
Merlin.Play("Explain"); 
Merlin.Speak("咳，这里收录了detrox和他朋友的文章。希望您能喜欢。"); 
Merlin.Play("Idle1_1"); 
Merlin.Play("Pleased"); 
Merlin.Speak("请进吧，我的客人"); 
Merlin.MoveTo(600,300); 
Merlin.Play("Surprised"); 
Merlin.Speak("哦对了，大家最近小心非典。多多注意哦"); 
Merlin.Play("Idle1_2");
Merlin.Play("GestureUp"); 
Merlin.Speak("祝您在这里愉快"); 
Merlin.Play("Read"); 
Merlin.Hide(); 
&lt;/script&gt; 
&lt;/body&gt; 
&lt;/html&gt;</FONT></PRE>
<P><FONT size=1>这里仅仅讲述了Microsoft agent最最简单用法。Microsoft Agent的目的是为我们提供一个语音命令环境，只是无奈于目前还没有中文的语言包，我们还不能体会到他的便利。您可以参考MSDN里对Agent的语音用法的说明。</FONT></P><img src ="http://www.blogjava.net/nayanliu/aggbug/5872.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/nayanliu/" target="_blank">楚客</a> 2005-06-10 14:35 <a href="http://www.blogjava.net/nayanliu/articles/5872.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>子父窗口之间的操作之小例子</title><link>http://www.blogjava.net/nayanliu/articles/5871.html</link><dc:creator>楚客</dc:creator><author>楚客</author><pubDate>Fri, 10 Jun 2005 06:31:00 GMT</pubDate><guid>http://www.blogjava.net/nayanliu/articles/5871.html</guid><wfw:comment>http://www.blogjava.net/nayanliu/comments/5871.html</wfw:comment><comments>http://www.blogjava.net/nayanliu/articles/5871.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/nayanliu/comments/commentRss/5871.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/nayanliu/services/trackbacks/5871.html</trackback:ping><description><![CDATA[<FONT size=1>&nbsp; 用window.openr打开的子父窗口之间的操作跟框架的是不一样的，子窗口和父窗口之间有opener来联系。而源窗口要访问子窗口要通过其句柄来操作。以下小例子希望能帮助新手更了解他们的操作。</FONT>
<P><FONT size=1><STRONG>test.htm</STRONG> 　</FONT></P>
<P><FONT size=1>&lt;html&gt;<BR>&lt;head&gt;<BR>&lt;meta http-equiv="Content-Type" content="text/html; charset=gb2312"&gt;<BR>&lt;meta name="GENERATOR" content="Microsoft FrontPage 4.0"&gt;<BR>&lt;meta name="ProgId" content="FrontPage.Editor.Document"&gt;<BR>&lt;title&gt;子父窗口的操作&lt;/title&gt;<BR>&lt;/head&gt;<BR>&lt;body&gt;<BR>&lt;script&gt;<BR>var win=null;<BR>function op(){<BR>win=window.open("about:blank","win","width=200,height=200");<BR>win.document.write("&lt;input type='button' value='关闭父窗口' onclick='window.opener.opener=null;window.opener.close()'&gt;");<BR>win.document.write("&lt;input type='button' value='刷新你窗口' onclick='window.opener.location.reload()'&gt;");<BR>}<BR>&lt;/script&gt;<BR>&lt;input onclick="op()" value="打开窗口" type="button"&gt;&lt;input type="button" value="最小化" onclick="if(win&amp;&amp;win.open&amp;&amp;!win.closed){win.resizeTo(0,0);win.moveTo(0,window.screen.width);}else alert('还没有打开窗口或已经关闭')"&gt;&lt;input type="button" value="最大化" onclick="if(win&amp;&amp;win.open&amp;&amp;!win.closed){win.moveTo(-4,-4);win.resizeTo(screen.availWidth+8,screen.availHeight+8);}else alert('还没有打开窗口或已经关闭');"&gt;&lt;input type=button value="关闭子窗口" onclick="if(win&amp;&amp;win.open&amp;&amp;!win.closed){win.opener=null;win.close()}else alert('还没有打开窗口或已关闭')"&gt;&lt;input type=button value="刷新子窗口" onclick="if(win&amp;&amp;win.open&amp;&amp;!win.closed){win.location.reload();win.focus()}else alert('窗口还没有打开或已关闭')"&gt;&lt;input type="button" value="看子窗口的大小" onclick="if(win&amp;&amp;win.open&amp;&amp;!win.closed){alert(win.document.body.clientWidth+'*'+win.document.body.clientHeight);win.focus();}else{alert('还没有打开窗口或者已关闭')};"&gt;<BR>&lt;/body&gt;<BR>&lt;/html&gt;</FONT></P><img src ="http://www.blogjava.net/nayanliu/aggbug/5871.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/nayanliu/" target="_blank">楚客</a> 2005-06-10 14:31 <a href="http://www.blogjava.net/nayanliu/articles/5871.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title> Dhtml:用ondrag事件简单的实现鼠标拖动物件.</title><link>http://www.blogjava.net/nayanliu/articles/5870.html</link><dc:creator>楚客</dc:creator><author>楚客</author><pubDate>Fri, 10 Jun 2005 06:29:00 GMT</pubDate><guid>http://www.blogjava.net/nayanliu/articles/5870.html</guid><wfw:comment>http://www.blogjava.net/nayanliu/comments/5870.html</wfw:comment><comments>http://www.blogjava.net/nayanliu/articles/5870.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/nayanliu/comments/commentRss/5870.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/nayanliu/services/trackbacks/5870.html</trackback:ping><description><![CDATA[<P><FONT size=2>&lt;script&gt;<BR>//Dhtml:用ondrag事件简单的实现鼠标拖动物件.<BR>//原作:风云舞<BR>var xx=0,yy=0<BR>&lt;/script&gt;<BR>&lt;img src="</FONT><A href="http://www.lshdic.com/bbs/image/shajia.jpg"><FONT size=2>http://www.lshdic.com/bbs/image/shajia.jpg</FONT></A><FONT size=2>" style='position:absolute;' ondragstart="setCapture();xx=event.x-this.offsetLeft;yy=event.y-this.offsetTop;" ondrag='this.style.left=event.x-xx;this.style.top=event.y-yy' ondragend="releaseCapture();"&gt;</FONT></P><img src ="http://www.blogjava.net/nayanliu/aggbug/5870.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/nayanliu/" target="_blank">楚客</a> 2005-06-10 14:29 <a href="http://www.blogjava.net/nayanliu/articles/5870.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Js+Dhtml:WEB程序员简易开发工具包(预先体验版) </title><link>http://www.blogjava.net/nayanliu/articles/5869.html</link><dc:creator>楚客</dc:creator><author>楚客</author><pubDate>Fri, 10 Jun 2005 06:26:00 GMT</pubDate><guid>http://www.blogjava.net/nayanliu/articles/5869.html</guid><wfw:comment>http://www.blogjava.net/nayanliu/comments/5869.html</wfw:comment><comments>http://www.blogjava.net/nayanliu/articles/5869.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/nayanliu/comments/commentRss/5869.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/nayanliu/services/trackbacks/5869.html</trackback:ping><description><![CDATA[<P><FONT face=Arial size=1>&lt;HTML&gt;<BR>&lt;HEAD&gt;<BR>&lt;META http-equiv='Content-Type' content='text/html;charset=gb2312'&gt;<BR>&lt;META name='Gemeratpr' content='网络程序员伴侣(Lshdic)2005_开拓版'&gt;<BR>&lt;TITLE&gt;LD5工具&lt;/TITLE&gt;<BR>&lt;style&gt;<BR>*{font-size:12px;font-family:宋体}<BR>td{width:180;cursor:hand;text-align:center}<BR>.n1{font-size:18px}<BR>.n2{font-size:18px;font-family:wingdings}<BR>.n3{font-size:18px;font-family:wingdings 2}<BR>.n4{font-size:18px;font-family:wingdings 3}<BR>.n5{font-size:18px;font-family:webdings}<BR>.n6{font-size:18px;font-family:Marlett}<BR>.n7{font-size:18px;font-family:华文彩云}<BR>&lt;/style&gt;<BR>&lt;/HEAD&gt;<BR>&lt;BODY onselectstart='if(event.srcElement.tagName!="INPUT")return false' scroll=no style='margin:0;border:1 solid menu' bgcolor='menu'&gt;<BR>&lt;table style='border-Collapse:collapse;border:2 solid white;' cellpadding=2 rules=all&gt;&lt;tr&gt;&lt;td style='width:100%'&gt;<BR>&lt;select onchange='change1(this.selectedIndex)' id='sel1' style='width:150'&gt;&lt;Optgroup label='特殊符号与字符集' style='color:red'&gt;<BR>&lt;option&gt;中文特殊符号&lt;option&gt;Assic实体对照&lt;option&gt;HTML已命名实体&lt;option&gt;HTML附加命名实体&lt;option&gt;他国单字与符号&lt;/Optgroup&gt;&lt;Optgroup label='常用颜色预览表' style='color:green'&gt;&lt;option&gt;W3C16色对照表&lt;option&gt;Windows系统色盘&lt;/Optgroup&gt;&lt;Optgroup label='图形字体集' style='color:blue'&gt;&lt;option&gt;Wingdings字体&lt;option&gt;Wingdings 2字体&lt;option&gt;Wingdings 3字体&lt;option&gt;Webdings字体&lt;option&gt;Marlett字体&lt;option&gt;华文彩云字体&lt;/Optgroup&gt;&lt;Optgroup label='数据探测与计算' style='color:purple'&gt;&lt;option&gt;键盘键值探测器&lt;option&gt;简易计算器&lt;option&gt;进制转换工具&lt;/select&gt;&lt;input style='width:80' id='txt' value='输入值'&gt;<BR>&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style='padding:0'&gt;<BR>&lt;div style='scrollbar-shadow-color:white;scrollbar-base-color:menu;scrollbar-arrow-color:black;overflow-Y:scroll;word-Break:break-all;width:240;height:250' id='a'&gt;&lt;/div&gt;<BR>&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;<BR>&lt;script&gt;<BR>/******************<BR>Author:lshdic(FYW)<BR>Website:http://www.lshdic.com<BR>E-mail:lshdic@sina.com<BR>Resume:本程序的资料整理、编写、最终审查等工作由LD2、4、5原作者独立完成,难免存在疏忽并不能保证数据100%正确,一页原代码,可独立运行于非LD2005开发环境的WEB浏览器内,另存后即可在本地使用<BR>******************/<BR>var str1="",toolcolor="bbbbbb",movecolor="#ffffff"<BR>function write1(){<BR>a.innerHTML="&lt;table cellspacing=0 cellpadding=3 rules=all style='border-Collapse:collapse;border:1 solid cccccc;' onmouseup='if(event.srcElement.tagName==\"TD\")txt.value=event.srcElement.innerText' onmouseover='if(event.srcElement.tagName==\"TD\"&amp;&amp;event.srcElement.bgColor==\"\")event.srcElement.bgColor=movecolor' onmouseout='if(event.srcElement.tagName==\"TD\"&amp;&amp;event.srcElement.bgColor==movecolor.toLowerCase())event.srcElement.bgColor=\"\"'&gt;"+str1+"&lt;/table&gt;"<BR>document.title=sel1.options[sel1.selectedIndex].text+"_参考输入工具["+(sel1.selectedIndex+1)+"]"<BR>}<BR>function write2(strs1,strs2){<BR>strs1==160?strss1="空格":strss1="&amp;#"+strs1+";"<BR>str1+="&lt;tr&gt;&lt;td&gt;&amp;amp;#"+strs1+";&lt;/td&gt;&lt;td&gt;&amp;amp;"+strs2+";&lt;/td&gt;&lt;td class='n1'&gt;"+strss1+"&lt;/td&gt;&lt;/tr&gt;"<BR>}<BR>function change1(changeindex){<BR>str1=""<BR>switch(changeindex){<BR>case 0:&nbsp;&nbsp;&nbsp; //中文特殊符号<BR>str0="·ˇ¨〃々-～‖…〔〕〈〉《》「」『』〖〗【】±×÷∧∨∑∏∪∩∈∷√⊥∥∠⌒⊙∫∮≡≌≈∽∝≠≮≯≤≥∞∵∴♂♀°℃＄¤￠￡‰§№☆★○●◎◇◆□■△▲※→←↑↓〓ˊˋ˙-―‥℅℉↖↗↘↙∕∟≒≦≧⊿═║╒╓╔╕╖╗╙╚╛╜╝╞╟╠╡╢╣╤╥╦╧╨╩╪╫╬╭╮╯╰╱╲╳▁▂▃▅▇█▉▊▋▌▍▎▏▓▔▕▼▽◢◣◤◥☉⊕〒‵′〝″ⅰⅱⅲⅳⅴⅵⅶⅷⅸⅹ⒈⒉⒊⒋⒌⒍⒎⒏⒐⒑⒒⒓⒔⒕⒖⒗⒘⒙⒚⒛⑴⑵⑶⑷⑸⑹⑺⑻⑼⑽⑾⑿⒀⒁⒂⒃⒄⒅⒆⒇①②③④⑤⑥⑦⑧⑨⑩㈠㈡㈢㈣㈤㈥㈦㈧㈨㈩ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫ─━│┃┄┅┆┇┈┉┊┋┌┍┎┏┐┑┒┓└┕┖┗┘┙┚┛├┝┞┟┠┡┢┣┤┥┦┧┨┩┪┫┬┭┮┯┰┱┲┳┴┵┶┷┸┹┺┻┼┽┾┿╀╁╂╃╄╅╆╇╈╉╊╋︵︶︹︺︿﹀︽︾﹁﹂﹃﹄︻︼︷︸︱"<BR>for(i=0;i&lt;str0.length-1;i++){<BR>str1+="&lt;tr&gt;"<BR>for(j=0;j&lt;7;j++){str1+="&lt;td&gt;"+str0.charAt(i)+"&lt;/td&gt;";i++}<BR>str1+="&lt;/tr&gt;";i--<BR>}<BR>break;<BR>case 4:&nbsp;&nbsp;&nbsp; //他国单字与符号<BR>str0="абвгдеёжзийклмнопрстуфхцчшщъыьэюяАБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρστυφχψωāáǎàēéěèīíǐìōóǒòūúǔùǖǘǚǜüêɑńňɡㄅㄆㄇㄈㄉㄊㄋㄌㄍㄎㄏㄐㄑㄒㄓㄔㄕㄖㄗㄘㄙㄚㄛㄜㄝㄞㄟㄠㄡㄢㄣㄤㄥㄦㄧㄨㄩぁあぃいぅうぇえぉおかがきぎくぐけげこごさざしじすずせぜそぞただちぢっつづてでとどなにぬねのはばぱひびぴふぶぷへべぺほぼぽまみむめもゃやゅゆょよらりるれろゎわゐゑをんァアィイゥウェエォオカガキギクグケゲコゴサザシジスズセゼソゾタダチヂッツヅテデトドナニヌネノハバパヒビピフブプヘベペホボポマミムメモャヤュユョヨラリルレロヮワヰヱヲンヴヵヶ"<BR>for(i=0;i&lt;str0.length-1;i++){<BR>str1+="&lt;tr&gt;"<BR>for(j=0;j&lt;7;j++){str1+="&lt;td class='n1'&gt;"+str0.charAt(i)+"&lt;/td&gt;";i++}<BR>str1+="&lt;/tr&gt;";i--<BR>}<BR>break;<BR>case 1:&nbsp;&nbsp;&nbsp; //Assic实体对照<BR>str1="&lt;tr bgcolor='"+toolcolor+"'&gt;&lt;td&gt;HTM表示&lt;/td&gt;&lt;td&gt;浏览&lt;/td&gt;&lt;td&gt;VB表示&lt;/td&gt;&lt;/tr&gt;"<BR>for(i=1;i&lt;384;i++){str1+="&lt;tr&gt;&lt;td&gt;&amp;amp;#"+i+";&lt;/td&gt;&lt;td class='n1'&gt;&amp;#"+i+";&lt;/td&gt;&lt;td&gt;chr("+i+")&lt;/td&gt;&lt;/tr&gt;"}<BR>break;<BR>case 7:&nbsp;&nbsp;&nbsp; //wingdings字体<BR>str1="&lt;tr bgcolor='"+toolcolor+"'&gt;&lt;td&gt;HTM表示&lt;/td&gt;&lt;td&gt;常规&lt;/td&gt;&lt;td&gt;应用字体&lt;/td&gt;&lt;/tr&gt;"<BR>for(i=33;i&lt;384;i++){str1+="&lt;tr&gt;&lt;td&gt;&amp;amp;#"+i+";&lt;/td&gt;&lt;td class='n1'&gt;&amp;#"+i+";&lt;/td&gt;&lt;td class='n2'&gt;&amp;#"+i+";&lt;/td&gt;&lt;/tr&gt;"}<BR>break;<BR>case 8:&nbsp;&nbsp;&nbsp; //wingdings 2字体<BR>str1="&lt;tr bgcolor='"+toolcolor+"'&gt;&lt;td&gt;HTM表示&lt;/td&gt;&lt;td&gt;常规&lt;/td&gt;&lt;td&gt;应用字体&lt;/td&gt;&lt;/tr&gt;"<BR>for(i=33;i&lt;384;i++){str1+="&lt;tr&gt;&lt;td&gt;&amp;amp;#"+i+";&lt;/td&gt;&lt;td class='n1'&gt;&amp;#"+i+";&lt;/td&gt;&lt;td class='n3'&gt;&amp;#"+i+";&lt;/td&gt;&lt;/tr&gt;"}<BR>break;<BR>case 9:&nbsp;&nbsp;&nbsp; //wingdings 3字体<BR>str1="&lt;tr bgcolor='"+toolcolor+"'&gt;&lt;td&gt;HTM表示&lt;/td&gt;&lt;td&gt;常规&lt;/td&gt;&lt;td&gt;应用字体&lt;/td&gt;&lt;/tr&gt;"<BR>for(i=33;i&lt;384;i++){str1+="&lt;tr&gt;&lt;td&gt;&amp;amp;#"+i+";&lt;/td&gt;&lt;td class='n1'&gt;&amp;#"+i+";&lt;/td&gt;&lt;td class='n4'&gt;&amp;#"+i+";&lt;/td&gt;&lt;/tr&gt;"}<BR>break;<BR>case 10:&nbsp;&nbsp;&nbsp; //webdings字体<BR>str1="&lt;tr bgcolor='"+toolcolor+"'&gt;&lt;td&gt;HTM表示&lt;/td&gt;&lt;td&gt;常规&lt;/td&gt;&lt;td&gt;应用字体&lt;/td&gt;&lt;/tr&gt;"<BR>for(i=33;i&lt;384;i++){str1+="&lt;tr&gt;&lt;td&gt;&amp;amp;#"+i+";&lt;/td&gt;&lt;td class='n1'&gt;&amp;#"+i+";&lt;/td&gt;&lt;td class='n5'&gt;&amp;#"+i+";&lt;/td&gt;&lt;/tr&gt;"}<BR>break;<BR>case 11:&nbsp;&nbsp;&nbsp; //Marlett字体<BR>str1="&lt;tr bgcolor='"+toolcolor+"'&gt;&lt;td&gt;HTM表示&lt;/td&gt;&lt;td&gt;常规&lt;/td&gt;&lt;td&gt;应用字体&lt;/td&gt;&lt;/tr&gt;"<BR>for(i=48;i&lt;58;i++){str1+="&lt;tr&gt;&lt;td&gt;&amp;amp;#"+i+";&lt;/td&gt;&lt;td class='n1'&gt;&amp;#"+i+";&lt;/td&gt;&lt;td class='n6'&gt;&amp;#"+i+";&lt;/td&gt;&lt;/tr&gt;"}<BR>for(i=97;i&lt;122;i++){str1+="&lt;tr&gt;&lt;td&gt;&amp;amp;#"+i+";&lt;/td&gt;&lt;td class='n1'&gt;&amp;#"+i+";&lt;/td&gt;&lt;td class='n6'&gt;&amp;#"+i+";&lt;/td&gt;&lt;/tr&gt;"}<BR>break;<BR>case 12:&nbsp;&nbsp;&nbsp; //华文彩云字体<BR>str1="&lt;tr bgcolor='"+toolcolor+"'&gt;&lt;td&gt;HTM表示&lt;/td&gt;&lt;td&gt;常规&lt;/td&gt;&lt;td&gt;应用字体&lt;/td&gt;&lt;/tr&gt;"<BR>for(i=33;i&lt;384;i++){str1+="&lt;tr&gt;&lt;td&gt;&amp;amp;#"+i+";&lt;/td&gt;&lt;td class='n1'&gt;&amp;#"+i+";&lt;/td&gt;&lt;td class='n7'&gt;&amp;#"+i+";&lt;/td&gt;&lt;/tr&gt;"}<BR>break;<BR>case 2:&nbsp;&nbsp;&nbsp; //HTML已命名实体<BR>var str0="iexcl;&amp;cent;&amp;pound;&amp;curren;&amp;yen;&amp;brvbar;&amp;sect;&amp;uml;&amp;copy;&amp;ordf;&amp;laquo;&amp;not;&amp;shy;&amp;reg;&amp;macr;&amp;deg;&amp;plusmn;&amp;sup2;&amp;sup3;&amp;acute;&amp;micro;&amp;para;&amp;middot;&amp;cedil;&amp;sup1;&amp;ordm;&amp;raquo;&amp;frac14;&amp;frac12;&amp;frac34;&amp;iquest;&amp;Agrave;&amp;Aacute;&amp;Acirc;&amp;Atilde;&amp;Auml;&amp;Aring;&amp;AElig;&amp;Ccedil;&amp;Egrave;&amp;Eacute;&amp;Ecirc;&amp;Euml;&amp;Igrave;&amp;Iacute;&amp;Icirc;&amp;Iuml;&amp;ETH;&amp;Ntilde;&amp;Ograve;&amp;Oacute;&amp;Ocirc;&amp;Otilde;&amp;Ouml;&amp;times;&amp;Oslash;&amp;Ugrave;&amp;Uacute;&amp;Ucirc;&amp;Uuml;&amp;Yacute;&amp;THORN;&amp;szlig;&amp;agrave;&amp;aacute;&amp;acirc;&amp;atilde;&amp;auml;&amp;aring;&amp;aelig;&amp;ccedil;&amp;egrave;&amp;eacute;&amp;ecirc;&amp;euml;&amp;igrave;&amp;iacute;&amp;icirc;&amp;iuml;&amp;eth;&amp;ntilde;&amp;ograve;&amp;oacute;&amp;ocirc;&amp;otilde;&amp;ouml;&amp;divide;&amp;oslash;&amp;ugrave;&amp;uacute;&amp;ucirc;&amp;uuml;&amp;yacute;&amp;thorn;&amp;yuml;".split('&amp;')<BR>str1="&lt;tr bgcolor='"+toolcolor+"'&gt;&lt;td&gt;HTM表示&lt;/td&gt;&lt;td&gt;命名&lt;/td&gt;&lt;td&gt;浏览&lt;/td&gt;&lt;/tr&gt;"<BR>write2(34,"quot");write2(38,"amp");write2(60,"lt");write2(62,"gt");write2(160,"nbsp");<BR>for(i=161;i&lt;256;i++){str1+="&lt;tr&gt;&lt;td&gt;&amp;amp;#"+i+";&lt;/td&gt;&lt;td&gt;&amp;amp;"+str0[i-161]+"&lt;/td&gt;&lt;td class='n1'&gt;&amp;#"+i+";&lt;/td&gt;&lt;/tr&gt;"}<BR>break;<BR>case 3:&nbsp;&nbsp;&nbsp; //HTML附加命名实体<BR>str1="&lt;tr bgcolor='"+toolcolor+"'&gt;&lt;td&gt;HTM表示&lt;/td&gt;&lt;td&gt;命名&lt;/td&gt;&lt;td&gt;浏览&lt;/td&gt;&lt;/tr&gt;"<BR>write2(402,"fnof");<BR>var str0="Alpha;&amp;Beta;&amp;Gamma;&amp;Delta;&amp;Epsilon;&amp;Zeta;&amp;Eta;&amp;Theta;&amp;Iota;&amp;Kappa;&amp;Lambda;&amp;Mu;&amp;Nu;&amp;Xi;&amp;Omicron;&amp;Pi;&amp;Rho;".split('&amp;')<BR>for(i=913;i&lt;930;i++){str1+="&lt;tr&gt;&lt;td&gt;&amp;amp;#"+i+";&lt;/td&gt;&lt;td&gt;&amp;amp;"+str0[i-913]+"&lt;/td&gt;&lt;td class='n1'&gt;&amp;#"+i+";&lt;/td&gt;&lt;/tr&gt;"}<BR>str0="Sigma;&amp;Tau;&amp;Upsilon;&amp;Phi;&amp;Chi;&amp;Psi;&amp;Omega;".split('&amp;')<BR>for(i=931;i&lt;938;i++){str1+="&lt;tr&gt;&lt;td&gt;&amp;amp;#"+i+";&lt;/td&gt;&lt;td&gt;&amp;amp;"+str0[i-931]+"&lt;/td&gt;&lt;td class='n1'&gt;&amp;#"+i+";&lt;/td&gt;&lt;/tr&gt;"}<BR>str0="alpha;&amp;beta;&amp;gamma;&amp;delta;&amp;epsilon;&amp;zeta;&amp;eta;&amp;theta;&amp;iota;&amp;kappa;&amp;lambda;&amp;mu;&amp;nu;&amp;xi;&amp;omicron;&amp;pi;&amp;rho;&amp;sigmaf;&amp;sigma;&amp;tau;&amp;upsilon;&amp;phi;&amp;chi;&amp;psi;&amp;omega;".split('&amp;')<BR>for(i=945;i&lt;970;i++){str1+="&lt;tr&gt;&lt;td&gt;&amp;amp;#"+i+";&lt;/td&gt;&lt;td&gt;&amp;amp;"+str0[i-945]+"&lt;/td&gt;&lt;td class='n1'&gt;&amp;#"+i+";&lt;/td&gt;&lt;/tr&gt;"}<BR>write2(977,"thetasym");write2(978,"upsih");write2(982,"piv");<BR>write2(8226,"bull");write2(8230,"hellip");write2(8242,"prime");write2(8243,"Prime");write2(8254,"oline");write2(8260,"frasl");write2(8472,"weierp");write2(8465,"image");write2(8476,"real");write2(8482,"trade");write2(8501,"alefsym");<BR>str0="larr;&amp;uarr;&amp;rarr;&amp;darr;&amp;harr;".split('&amp;')<BR>for(i=8592;i&lt;8597;i++){str1+="&lt;tr&gt;&lt;td&gt;&amp;amp;#"+i+";&lt;/td&gt;&lt;td&gt;&amp;amp;"+str0[i-8592]+"&lt;/td&gt;&lt;td class='n1'&gt;&amp;#"+i+";&lt;/td&gt;&lt;/tr&gt;"}<BR>write2(8629,"crarr");<BR>str0="lArr;&amp;uArr;&amp;rArr;&amp;dArr;&amp;hArr;".split('&amp;')<BR>for(i=8656;i&lt;8661;i++){str1+="&lt;tr&gt;&lt;td&gt;&amp;amp;#"+i+";&lt;/td&gt;&lt;td&gt;&amp;amp;"+str0[i-8656]+"&lt;/td&gt;&lt;td class='n1'&gt;&amp;#"+i+";&lt;/td&gt;&lt;/tr&gt;"}<BR>write2(8704,"forall");write2(8706,"part");write2(8707,"exist");write2(8709,"empty");write2(8711,"nabla");write2(8712,"isin");write2(8713,"notin");write2(8715,"ni");write2(8719,"prod");write2(8722,"sum");write2(8722,"minus");write2(8727,"lowast");write2(8730,"radic");write2(8733,"prop");write2(8734,"infin");write2(8736,"ang");write2(8869,"and");write2(8870,"or");write2(8745,"cap");write2(8746,"cup");write2(8747,"int");write2(8756,"there4");write2(8764,"sim");write2(8773,"cong");write2(8773,"asymp");write2(8800,"ne");write2(8801,"equiv");write2(8804,"le");write2(8805,"ge");write2(8834,"sub");write2(8835,"sup");write2(8836,"nsub");write2(8838,"sube");write2(8839,"supe");write2(8853,"oplus");write2(8855,"otimes");write2(8869,"perp");write2(8901,"sdot");write2(8968,"lceil");write2(8969,"rceil");write2(8970,"lfloor");write2(8971,"rfloor");write2(9001,"lang");write2(9002,"rang");write2(9674,"loz");write2(9824,"spades");write2(9827,"clubs");write2(9829,"hearts");write2(9830,"diams");<BR>break;<BR>case 5:&nbsp;&nbsp;&nbsp; //W3C16色对照表<BR>str1="&lt;tr bgcolor='"+toolcolor+"'&gt;&lt;td&gt;效果&lt;/td&gt;&lt;td&gt;名称&lt;/td&gt;&lt;td&gt;16进制表示&lt;/td&gt;&lt;/tr&gt;"<BR>str0="Black,White,Red,Yellow,Lime,Aqua,Blue,Fuchsia,Gray,Silver,Maroon,Olive,Green,Teal,Navy,Purple,Transparent".split(",")<BR>str00="000000,ffffff,ff0000,ffff00,00ff00,00ffff,0000ff,ff00ff,808080,c0c0c0,800000,808000,008000,008080,000080,800080,透明色".split(",")<BR>for(i=0;i&lt;str0.length;i++){str1+="&lt;tr&gt;&lt;td bgcolor='"+str0[i]+"'&gt;&lt;/td&gt;&lt;td&gt;"+str0[i]+"&lt;/td&gt;&lt;td style='color:#"+str00[i]+"'&gt;#"+str00[i]+"&lt;/td&gt;&lt;/tr&gt;"}<BR>break;<BR>case 6:&nbsp;&nbsp;&nbsp; //Windows系统色盘<BR>str1="&lt;tr bgcolor='"+toolcolor+"'&gt;&lt;td&gt;效果1&lt;/td&gt;&lt;td&gt;效果2&lt;/td&gt;&lt;td&gt;名称&lt;/td&gt;&lt;/tr&gt;"<BR>str0="windowtext,windowframe,window,threedshadow,buttonshadow,threedlightshadow,threedhighlight,threedface,buttonface,threeddarkshadow,scrollbar,menutext,menu,infotext,infobackground,inactivecaptiontext,inactivecaption,inactiveborder,highlighttext,highlight,graytext,captiontext,buttontext,buttonhighlight,background,appworkspace,activecaption,activeborder".split(",")<BR>for(i=0;i&lt;str0.length;i++){str1+="&lt;tr&gt;&lt;td bgcolor='"+str0[i]+"'&gt;&lt;/td&gt;&lt;td style='color:"+str0[i]+"'&gt;Lshdic&lt;/td&gt;&lt;td style='word-Break:keep-all;'&gt;"+str0[i]+"&lt;/td&gt;&lt;/tr&gt;"}<BR>break;<BR>case 13:&nbsp;&nbsp;&nbsp; //键盘键值探测器<BR>str1="&lt;center&gt;&amp;nbsp;&lt;p&gt;现在请您按下您键盘上的任意一个键&lt;/center&gt;&lt;p&gt;&lt;center&gt;其键值会显示在上方输入框中&lt;/center&gt;"<BR>break;<BR>case 14:&nbsp;&nbsp;&nbsp; //简易计算器<BR>str1="&lt;center&gt;&amp;nbsp;&lt;p&gt;请在下边输入框中输入需要计算的公式&lt;/center&gt;&lt;p&gt;&lt;center&gt;公式如 12+64 20/5 100+(77*44)&lt;/center&gt;&lt;p&gt;&lt;center&gt;&lt;input id='txt2'&gt;&lt;br&gt;&lt;input type='button' value='开始计算' onclick='try{txt.value=eval(txt2.value)}catch(e){alert(\"错误的公式！\")}'&gt;&lt;/center&gt;"<BR>break;<BR>case 15:&nbsp;&nbsp;&nbsp; //进制转换工具<BR>for(i=2;i&lt;129;i++){str0+="&lt;option&gt;"+i;i++}<BR>str1="&lt;center&gt;&amp;nbsp;&lt;p&gt;请在下边输入框中输入一组数字&lt;/center&gt;&lt;p&gt;&lt;center&gt;&lt;input id='txt2'&gt;&lt;br&gt;转换为:&lt;select id='sel2'&gt;"+str0+"&lt;/select&gt;进制&lt;br&gt;&lt;input type='button' value='开始转换' onclick='try{txt.value=new Number(txt2.value).toString(sel2.options[sel2.selectedIndex].text)}catch(e){alert(\"异常错误！\")}'&gt;&lt;/center&gt;"<BR>break;<BR>}<BR>write1()<BR>}<BR>function document.onkeydown(){&nbsp;&nbsp;&nbsp; //页面按键时<BR>if(sel1.selectedIndex==13){&nbsp; //检测是否开启键盘键值探测器<BR>txt.value=event.keyCode;event.keyCode=0;event.returnValue=false;<BR>}}</FONT></P>
<P><FONT face=Arial size=1>temp1=location.href //初始化启动部分（附加的URL参数可以控制预先选取的列表，形式如xxx.htm?xxx=*，其中*应为0-12之间的数字，用于配合Lshdic2005软体附属工具的默认启动调用）<BR>try{<BR>sel1.options[temp1.substr(temp1.indexOf('=')+1)].selected=true;sel1.onchange()<BR>}catch(e){<BR>sel1.onchange()<BR>}</FONT></P>
<P><FONT face=Arial size=1>//本插件程序由于能够在WEB浏览器中直接运行,因此提前于LD5软件的发布供大家使用,因此,本程序并非为最终发布时的完整版本形态<BR>&lt;/script&gt;<BR>&lt;/BODY&gt;<BR>&lt;/HTML&gt; <BR></FONT></P><img src ="http://www.blogjava.net/nayanliu/aggbug/5869.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/nayanliu/" target="_blank">楚客</a> 2005-06-10 14:26 <a href="http://www.blogjava.net/nayanliu/articles/5869.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>判断客户浏览器是否支持cookie</title><link>http://www.blogjava.net/nayanliu/articles/5867.html</link><dc:creator>楚客</dc:creator><author>楚客</author><pubDate>Fri, 10 Jun 2005 06:24:00 GMT</pubDate><guid>http://www.blogjava.net/nayanliu/articles/5867.html</guid><wfw:comment>http://www.blogjava.net/nayanliu/comments/5867.html</wfw:comment><comments>http://www.blogjava.net/nayanliu/articles/5867.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/nayanliu/comments/commentRss/5867.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/nayanliu/services/trackbacks/5867.html</trackback:ping><description><![CDATA[<SPAN id=ArticleContent1_ArticleContent1_lblContent><FONT size=2>&nbsp;</FONT>
<P align=center><STRONG><FONT size=2>判断客户浏览器是否支持cookie</FONT></STRONG></P>
<P align=left><FONT size=2><STRONG>&nbsp;&nbsp;</STRONG>&nbsp; 如果你的网页需要用cookie来保存之前访问你网页客户的信息，那首先你就必须确保你的客户端浏览器支持cookie，这包括浏览器的cookie选项是否启用（在大多数浏览器中都有这个选项），那么你既可以发出一条信息来提醒你的客户开启cookie，也可以创建代码来操纵这个选项，以使cookie选项启动。</FONT></P>
<P align=left><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 为了解决这个问题，用一下代码去检测你的客户端是否开启了cookie：</FONT></P><PRE><FONT size=2>&lt;script type="text/javascript"&gt;
var cookieEnabled=(navigator.cookieEnabled)? true : false
//判断cookie是否开启
</FONT></PRE><PRE><FONT size=2>//如果浏览器不是ie4+或ns6+</FONT></PRE><PRE><FONT size=2>if (typeof navigator.cookieEnabled=="undefined" &amp;&amp; !cookieEnabled){ 
document.cookie="testcookie"
cookieEnabled=(document.cookie=="testcookie")? true : false
document.cookie="" //erase dummy value
}

//if (cookieEnabled) </FONT></PRE><PRE><FONT size=2>//if cookies are enabled on client's browser
//do whatever

&lt;/script&gt;</FONT></PRE></SPAN><img src ="http://www.blogjava.net/nayanliu/aggbug/5867.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/nayanliu/" target="_blank">楚客</a> 2005-06-10 14:24 <a href="http://www.blogjava.net/nayanliu/articles/5867.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>几种常用的表单输入判断</title><link>http://www.blogjava.net/nayanliu/articles/5866.html</link><dc:creator>楚客</dc:creator><author>楚客</author><pubDate>Fri, 10 Jun 2005 06:21:00 GMT</pubDate><guid>http://www.blogjava.net/nayanliu/articles/5866.html</guid><wfw:comment>http://www.blogjava.net/nayanliu/comments/5866.html</wfw:comment><comments>http://www.blogjava.net/nayanliu/articles/5866.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/nayanliu/comments/commentRss/5866.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/nayanliu/services/trackbacks/5866.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: &nbsp;&nbsp;1//函数名：chksafe&nbsp;&nbsp;2//功能介绍：检查是否含有"'",'\\',"/"&nbsp;&nbsp;3//参数说明：要检查的字符串&nbsp;&nbsp;4//返回值：0：是&nbsp;&nbsp;1：不是&nbsp;&nbsp;5function&nbsp;chksafe(a)&nbsp;&nbsp;6{&nbsp;&nbsp;&nbsp;7&...&nbsp;&nbsp;<a href='http://www.blogjava.net/nayanliu/articles/5866.html'>阅读全文</a><img src ="http://www.blogjava.net/nayanliu/aggbug/5866.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/nayanliu/" target="_blank">楚客</a> 2005-06-10 14:21 <a href="http://www.blogjava.net/nayanliu/articles/5866.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>javascript,只让输入数字的输入框,只能输入汉字的输入框</title><link>http://www.blogjava.net/nayanliu/articles/5865.html</link><dc:creator>楚客</dc:creator><author>楚客</author><pubDate>Fri, 10 Jun 2005 06:17:00 GMT</pubDate><guid>http://www.blogjava.net/nayanliu/articles/5865.html</guid><wfw:comment>http://www.blogjava.net/nayanliu/comments/5865.html</wfw:comment><comments>http://www.blogjava.net/nayanliu/articles/5865.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/nayanliu/comments/commentRss/5865.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/nayanliu/services/trackbacks/5865.html</trackback:ping><description><![CDATA[<FONT size=1>只让输入数字的输入框<BR><BR>&lt;body&gt;<BR>&lt;script&gt;<BR>function&nbsp;JHshNumberText()<BR>{<BR>if&nbsp;(&nbsp;!(((window.event.keyCode&nbsp;&gt;=&nbsp;48)&nbsp;&amp;&amp;&nbsp;(window.event.keyCode&nbsp;&lt;=&nbsp;57))&nbsp;<BR>||&nbsp;(window.event.keyCode&nbsp;==&nbsp;13)&nbsp;||&nbsp;(window.event.keyCode&nbsp;==&nbsp;46)&nbsp;<BR>||&nbsp;(window.event.keyCode&nbsp;==&nbsp;45)))<BR>{<BR>window.event.keyCode&nbsp;=&nbsp;0&nbsp;;<BR>}<BR>}&nbsp;<BR>&lt;/s cript&gt;<BR>&lt;form&nbsp;name=frm&gt;<BR>&lt;input&nbsp;type=text&nbsp;name=test&nbsp;value=""&nbsp;onKeypress="JHshNumberText()"&gt;<BR>&lt;input&nbsp;type=button&nbsp;name=submit&nbsp;value=submit&gt;<BR>&lt;/form&gt;<BR>&lt;/body&gt; <BR><BR>只能输入汉字的输入框<BR><BR><FONT size=3>&nbsp;</FONT></FONT><FONT size=1>&lt;SCRIPT&gt;<BR>function onlychinese() <BR>{<BR>if ((window.event.keyCode &gt;=32) &amp;&amp; (window.event.keyCode &lt;= 126)) <BR>{<BR>window.event.keyCode = 0 ;<BR>}<BR>} <BR>&lt;/SCRIPT&gt;<BR><BR>&lt;FORM name=frm&nbsp;&gt;只能输入汉字的输入框 <BR>&lt;P&gt;&lt;INPUT onkeypress="onlychinese() " name=test&gt; &lt;INPUT type=button value=只能输入中文 name=submit&nbsp; onclick="javascript:ALERT('谢谢您的访问!')"&gt; &lt;/P&gt;&lt;/FORM&gt;<BR></FONT><img src ="http://www.blogjava.net/nayanliu/aggbug/5865.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/nayanliu/" target="_blank">楚客</a> 2005-06-10 14:17 <a href="http://www.blogjava.net/nayanliu/articles/5865.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>可输入的select改进版本,同一页面可有多个list,调用接口简化  </title><link>http://www.blogjava.net/nayanliu/articles/5864.html</link><dc:creator>楚客</dc:creator><author>楚客</author><pubDate>Fri, 10 Jun 2005 06:13:00 GMT</pubDate><guid>http://www.blogjava.net/nayanliu/articles/5864.html</guid><wfw:comment>http://www.blogjava.net/nayanliu/comments/5864.html</wfw:comment><comments>http://www.blogjava.net/nayanliu/articles/5864.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/nayanliu/comments/commentRss/5864.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/nayanliu/services/trackbacks/5864.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: &nbsp;&nbsp;1&lt;html&gt;&nbsp;&nbsp;2&lt;head&gt;&nbsp;&nbsp;3&lt;title&gt;Untitled&nbsp;Document&lt;/title&gt;&nbsp;&nbsp;4&lt;meta&nbsp;http-equiv="Content-Type"&nbsp;content="text/html;&nbsp;chars...&nbsp;&nbsp;<a href='http://www.blogjava.net/nayanliu/articles/5864.html'>阅读全文</a><img src ="http://www.blogjava.net/nayanliu/aggbug/5864.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/nayanliu/" target="_blank">楚客</a> 2005-06-10 14:13 <a href="http://www.blogjava.net/nayanliu/articles/5864.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>HTML日积月累--01</title><link>http://www.blogjava.net/nayanliu/articles/5698.html</link><dc:creator>楚客</dc:creator><author>楚客</author><pubDate>Tue, 07 Jun 2005 08:29:00 GMT</pubDate><guid>http://www.blogjava.net/nayanliu/articles/5698.html</guid><wfw:comment>http://www.blogjava.net/nayanliu/comments/5698.html</wfw:comment><comments>http://www.blogjava.net/nayanliu/articles/5698.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/nayanliu/comments/commentRss/5698.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/nayanliu/services/trackbacks/5698.html</trackback:ping><description><![CDATA[<P>1.使用简体中文字符集<BR>&lt;meta http-equiv="Content-Type" content="text/html; charset=gb2312"&gt;</P>
<P>2.禁止缓存&nbsp; <BR><FONT size=2>&lt;meta http-equiv="pragma" content="no-cache"&gt;</FONT></P><img src ="http://www.blogjava.net/nayanliu/aggbug/5698.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/nayanliu/" target="_blank">楚客</a> 2005-06-07 16:29 <a href="http://www.blogjava.net/nayanliu/articles/5698.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>用PHP生成WORD,EXCEL文件</title><link>http://www.blogjava.net/nayanliu/articles/5365.html</link><dc:creator>楚客</dc:creator><author>楚客</author><pubDate>Tue, 31 May 2005 05:16:00 GMT</pubDate><guid>http://www.blogjava.net/nayanliu/articles/5365.html</guid><wfw:comment>http://www.blogjava.net/nayanliu/comments/5365.html</wfw:comment><comments>http://www.blogjava.net/nayanliu/articles/5365.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/nayanliu/comments/commentRss/5365.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/nayanliu/services/trackbacks/5365.html</trackback:ping><description><![CDATA[<P>&lt;?&nbsp;&nbsp; //生成EXCEL文件<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; header("Content-type:application/vnd.ms-excel");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; header("Content-Disposition:filename=test.xls");</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo "test1\t";<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo "test2\t\n";<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo "test1\t";<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo "test2\t\n";<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo "test1\t";<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo "test2\t\n";<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo "test1\t";<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo "test2\t\n";<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo "test1\t";<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo "test2\t\n";<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo "test1\t";<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo "test2\t\n";<BR>?&gt;<BR><BR>//改动相应文件头就可以输出.doc .xls等文件格式了<BR><BR>在php环境运行上面的代码，大家就可以看到浏览器询问用户是否下载excel文档，点击保存，硬盘上就多了一个excel的文件，使用excel打开就会看到最终的结果，怎么样不错吧。<BR><BR>　　其实在做真正的应用的时候，大家可以将数据从数据库中取出，然后按照每一列数据结束后加\t,每一行数据结束后加\n的方法echo出来，在php的开头用header("Content-type:application/vnd.ms-excel");表示输出的是excel文件，用header("Content-Disposition:filename=test.xls");表示输出的文件名为text.xls。这样就ok了。 </P>
<P>　　我们更可以修改header让他输出更多格式的文件，这样php在处理各种类型文件方面就更加方便了 <BR><BR><BR>哈哈，托你的福，我已经知道怎么解决了，你把下面着段代码存为.xls文件看看，知道该怎么做了吧？</P>
<P><BR>&nbsp; &lt;html xmlns:o="urn:schemas-microsoft-com:office:office"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xmlns:x="urn:schemas-microsoft-com:office:excel"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xmlns="<A href="http://www.w3.org/TR/REC-html40">http://www.w3.org/TR/REC-html40</A>"&gt;<BR>&nbsp; &lt;head&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;meta http-equiv="expires" content="Mon, 06 Jan 1999 00:00:01 GMT"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!--[if gte mso 9]&gt;&lt;xml&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;x:ExcelWorkbook&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;x:ExcelWorksheets&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;x:ExcelWorksheet&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;x:Name&gt;&lt;/x:Name&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;x:WorksheetOptions&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;x:DisplayGridlines/&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/x:WorksheetOptions&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/x:ExcelWorksheet&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/x:ExcelWorksheets&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/x:ExcelWorkbook&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/xml&gt;&lt;![endif]--&gt;</P>
<P>&nbsp; &lt;/head&gt;</P>
<P>&lt;table width="100%" border="0" cellspacing="0" cellpadding="0"&gt;<BR>&lt;tr&gt;&lt;td align="center" class="big6" &gt;Users (except the ones disabled)&lt;/td&gt;&lt;/tr&gt;<BR>&nbsp;<BR>&lt;tr&gt;&lt;td class="greyborder"&gt;<BR>&nbsp; &lt;table border="1" align="center" width="100%" cellpadding="1" cellspacing="1"&gt;<BR>&nbsp; &lt;tr align="center"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;td class="TableTopHeader" nowrap&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Login&nbsp;&nbsp; &lt;/td&gt;<BR>&nbsp;&nbsp; &lt;td class="TableTopHeader" nowrap&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Name&nbsp;&nbsp; &lt;/td&gt;<BR>&nbsp;&nbsp; &lt;td class="TableTopHeader" width="3%" nowrap&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EMail&nbsp;&nbsp; &lt;/td&gt;<BR>&nbsp;&nbsp; &lt;td class="TableTopHeader" nowrap&gt;<BR>&nbsp;&nbsp;&nbsp; Department&nbsp;&nbsp; &lt;/td&gt;<BR>&nbsp;&nbsp; &lt;td class="TableTopHeader" nowrap&gt;<BR>&nbsp;&nbsp;&nbsp; Position&nbsp;&nbsp; &lt;/td&gt;<BR>&nbsp;&nbsp; &lt;td class="TableTopHeader" nowrap width="1%"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp; Level&nbsp;&nbsp; &lt;/td&gt;<BR>&nbsp;&nbsp; &lt;td class="TableTopHeader"&gt;Address&lt;/td&gt;<BR>&nbsp;&nbsp; &lt;td class="TableTopHeader"&gt;Phone&lt;/td&gt;<BR>&lt;/tr&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;tr&nbsp; class="even"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;td class="mtlist"&gt;&amp;nbsp;joesen&lt;/td&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;td class="mtlist"&gt;&amp;nbsp;hong joesen&lt;/td&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;td class="mtlist" &gt;allfu@163.net&lt;/td&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;td class="mtlist"&gt;&amp;nbsp;Software developments&lt;/td&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;td class="mtlist"&gt;&amp;nbsp;System Administrator&lt;/td&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;td class="mtlist"&gt;&amp;nbsp;Admin&lt;/td&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;td class="mtlist"&gt;&amp;nbsp;&lt;/td&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;td class="mtlist"&gt;&amp;nbsp;&lt;/td&gt;<BR>&nbsp; &lt;/tr&gt;<BR>&nbsp; &lt;/table&gt;<BR>&lt;/td&gt;&lt;/tr&gt;&nbsp; <BR>&lt;/table&gt;<BR></P><img src ="http://www.blogjava.net/nayanliu/aggbug/5365.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/nayanliu/" target="_blank">楚客</a> 2005-05-31 13:16 <a href="http://www.blogjava.net/nayanliu/articles/5365.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>计数器，设为首页，加入收藏</title><link>http://www.blogjava.net/nayanliu/articles/5363.html</link><dc:creator>楚客</dc:creator><author>楚客</author><pubDate>Tue, 31 May 2005 05:07:00 GMT</pubDate><guid>http://www.blogjava.net/nayanliu/articles/5363.html</guid><wfw:comment>http://www.blogjava.net/nayanliu/comments/5363.html</wfw:comment><comments>http://www.blogjava.net/nayanliu/articles/5363.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/nayanliu/comments/commentRss/5363.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/nayanliu/services/trackbacks/5363.html</trackback:ping><description><![CDATA[<P>&lt;?php<BR>/*<BR>&nbsp;*访客计数器<BR>&nbsp;*/</P>
<P>$counterFile =&nbsp; "counter.txt";</P>
<P>function displayCounter($counterFile) {<BR>&nbsp; $fp&nbsp;&nbsp;&nbsp;&nbsp; = fopen($counterFile,"rw");<BR>&nbsp; $num&nbsp;&nbsp;&nbsp; = fgets($fp,5);<BR>&nbsp; $num&nbsp;&nbsp;&nbsp; += 1;<BR>&nbsp; print&nbsp; "您是第 "."$num"." 位访客";<BR>&nbsp; exec( "rm -rf $counterFile");<BR>&nbsp; exec( "echo $num &gt; $counterFile");<BR>}</P>
<P>if (!file_exists($counterFile)) {<BR>&nbsp; exec( "echo 0 &gt; $counterFile");<BR>}<BR>?&gt;<BR><BR>&lt;!--使用--&gt;<BR>&lt;div align="center"&gt;<BR>&nbsp;&lt;br&gt;&lt;?php displayCounter($counterFile);?&gt;&lt;br&gt;<BR>&lt;/div&gt;<BR><BR>---------------------------------------------------------------------------------------------------------------<BR><BR>&lt;script&gt;<BR>function setfirst() {<BR>u="<A href="http://www.tiantengelec.com.hk/">http://www.tiantengelec.com.hk/</A>";<BR>if(!hp.isHomePage(u))<BR>{hp.setHomePage(u);}<BR>else<BR>{<BR>document.write("你已成功设<A href="http://www.tiantengelec.com.hk/">http://www.tiantengelec.com.hk/</A>为首页,本站将为你提供更好的服务!&lt;p&gt;&lt;a href=http://www.tiantengelec.com.hk/&gt;返回首页&lt;/a&gt;");<BR>}<BR>if(!hp.isHomePage(u))<BR>{<BR>document.write("你还没有设<A href="http://www.tiantengelec.com.hk/">http://www.tiantengelec.com.hk/</A>为首页,请&lt;a href=http://www.tiantengelec.com.hk/&gt;返回首页&lt;/a&gt;");<BR>}<BR>}<BR>&lt;/script&gt;<BR><BR>&lt;!--使用--&gt;<BR>&lt;TD width="91" height="118"&gt;&lt;div align="center" class="w3"&gt;&lt;a href="javascript:window.external.AddFavorite('http://www.tiantengelec.com.hk/', '“天腾电子”&amp;quot;/www.tiantengelec.com.hk')"&gt;加入收藏&lt;/a&gt;&lt;br&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;br&gt;&nbsp;&lt;br&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;a href="javascript:setfirst()"&gt;设为首页&lt;/a&gt;&lt;/div&gt;&lt;/TD&gt;</P><img src ="http://www.blogjava.net/nayanliu/aggbug/5363.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/nayanliu/" target="_blank">楚客</a> 2005-05-31 13:07 <a href="http://www.blogjava.net/nayanliu/articles/5363.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>