﻿<?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>博客园-红叶的专栏</title><link>http://www.cnblogs.com/redleaf1995/</link><description>世界很美好,我们要珍惜每一天</description><language>zh-cn</language><lastBuildDate>Wed, 10 Feb 2010 09:10:06 GMT</lastBuildDate><pubDate>Wed, 10 Feb 2010 09:10:06 GMT</pubDate><ttl>60</ttl><item><title>DotNetZip支持多种编码格式</title><link>http://www.cnblogs.com/redleaf1995/archive/2009/10/26/1589793.html</link><dc:creator>红色枫叶</dc:creator><author>红色枫叶</author><pubDate>Mon, 26 Oct 2009 02:56:00 GMT</pubDate><guid>http://www.cnblogs.com/redleaf1995/archive/2009/10/26/1589793.html</guid><description><![CDATA[<p>阅读: 1450 评论: 7 作者: <a href="http://www.cnblogs.com/redleaf1995/" target="_blank">红色枫叶</a> 发表于 2009-10-26 10:56 <a href="http://www.cnblogs.com/redleaf1995/archive/2009/10/26/1589793.html" target="_blank">原文链接</a></p><p>前几天发布了[<a class="postTitle2" id="ctl04_TitleUrl" href="http://www.cnblogs.com/redleaf1995/archive/2009/10/22/1587908.html" target="_blank">DotNetZip解决文件名称中文字符不显示的问题</a>],解决了中文名称的显示问题,从几位热心网友的回帖来看,是希望能支持多种编码!!<br /><span class="blog_comment_body" id="comment_body_1679646">这两天抽了点时间,将源代码修改了一下,使其能够支持多种编码!!<br />当然也可以不指定编码,这时将使用默认编码:GB2312!!<br /><br />下载地址: <a href="http://files.cnblogs.com/redleaf1995/DotNetZip2.rar" target="_blank">http://files.cnblogs.com/redleaf1995/DotNetZip2.rar</a></span><span class="blog_comment_body"></p>
<p><br /></p></span><img src="http://www.cnblogs.com/redleaf1995/aggbug/1589793.html?type=1" width="1" height="1" alt=""/><p>评论: 7　<a href="http://www.cnblogs.com/redleaf1995/archive/2009/10/26/1589793.html#pagedcomment" target="_blank">查看评论</a>　<a href="http://www.cnblogs.com/redleaf1995/archive/2009/10/26/1589793.html#commentform" target="_blank">发表评论</a></p><hr/><p>最新新闻：<br/>· <a href="http://news.cnblogs.com/n/56857/" target="_blank">Facebook与美国在线合作 整合AIM动态功能</a><span style="color:gray">(2010-02-10 16:41)</span><br/>· <a href="http://news.cnblogs.com/n/56855/" target="_blank">NDepend 3.0已与Visual Studio集成</a><span style="color:gray">(2010-02-10 16:17)</span><br/>· <a href="http://news.cnblogs.com/n/56854/" target="_blank">Ruby in Steel 1.5发布，去除IronRuby支持</a><span style="color:gray">(2010-02-10 16:14)</span><br/>· <a href="http://news.cnblogs.com/n/56852/" target="_blank">淘宝网通过索引模式涉足网络文学</a><span style="color:gray">(2010-02-10 15:59)</span><br/>· <a href="http://news.cnblogs.com/n/56851/" target="_blank">苹果发布 iPhone/iPad SDK 3.2 beta2 开发包</a><span style="color:gray">(2010-02-10 15:37)</span><br/></p><p>编辑推荐：<a href="http://news.cnblogs.com/news/tag/Buzz/" target="_blank">Google Buzz相关新闻</a><br/></p><p>网站导航：<a href="http://www.cnblogs.com" target="_blank">博客园首页</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/" target="_blank">个人主页</a>&nbsp;&nbsp;<a href="http://news.cnblogs.com" target="_blank">新闻</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/ing/" target="_blank">闪存</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/group/" target="_blank">小组</a>&nbsp;&nbsp;<a href="http://space.cnblogs.com/q/" target="_blank">博问</a>&nbsp;&nbsp;<a href="http://space.cnblogs.com" target="_blank">社区</a>&nbsp;&nbsp;<a href="http://kb.cnblogs.com" target="_blank">知识库</a></p>]]></description></item><item><title>DotNetZip解决文件名称中文字符不显示的问题</title><link>http://www.cnblogs.com/redleaf1995/archive/2009/10/22/1587908.html</link><dc:creator>红色枫叶</dc:creator><author>红色枫叶</author><pubDate>Thu, 22 Oct 2009 03:00:00 GMT</pubDate><guid>http://www.cnblogs.com/redleaf1995/archive/2009/10/22/1587908.html</guid><description><![CDATA[<p>阅读: 1977 评论: 7 作者: <a href="http://www.cnblogs.com/redleaf1995/" target="_blank">红色枫叶</a> 发表于 2009-10-22 11:00 <a href="http://www.cnblogs.com/redleaf1995/archive/2009/10/22/1587908.html" target="_blank">原文链接</a></p><p>&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-family: 宋体">由于工作需要</span>,<span style="font-family: 宋体">从网上下载了一个压缩组件</span>--DotNetZip,<span style="font-family: 宋体">使用感觉良好</span>,<span style="font-family: 宋体">但是目录中有中文名称的文件时</span>,<span style="font-family: 宋体">就会出现问题</span>,<span style="font-family: 宋体">要么名称显示不全</span>,<span style="font-family: 宋体">要么就显示若干个问号</span>,<span style="font-family: 宋体">很是令人苦恼</span>!!</p>
<p><span style="font-family: 宋体">&nbsp;&nbsp;&nbsp; 没办法</span>,<span style="font-family: 宋体">只好自己动手解决问题啦</span>,<span style="font-family: 宋体">一步步的跟踪定位</span>,<span style="font-family: 宋体">最后找到</span>ZipEntry<span style="font-family: 宋体">类的</span>WriterHeader<span style="font-family: 宋体">方法</span>,<span style="font-family: 宋体">估计是写文件头</span>,<span style="font-family: 宋体">文件名称应当写在这里</span>,<span style="font-family: 宋体">经过调试</span>,<span style="font-family: 宋体">发现这一行</span>:<br /></p>
<p>
<p><span></span></p>
<div class="cnblogs_code"><img id="Code_Closed_Image_104256" onclick="this.style.display='none'; document.getElementById('Code_Closed_Text_104256').style.display='none'; document.getElementById('Code_Open_Image_104256').style.display='inline'; document.getElementById('Code_Open_Text_104256').style.display='inline';" height="16" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" width="11" align="top"><img id="Code_Open_Image_104256" style="display: none" onclick="this.style.display='none'; document.getElementById('Code_Open_Text_104256').style.display='none'; getElementById('Code_Closed_Image_104256').style.display='inline'; getElementById('Code_Closed_Text_104256').style.display='inline';" height="16" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" width="11" align="top"><span class="cnblogs_code_Collapse" id="Code_Closed_Text_104256">Code</span><span id="Code_Open_Text_104256" style="display: none"><br /><!--<br />
<br />
Code highlighting produced by Actipro CodeHighlighter (freeware)<br />
http://www.CodeHighlighter.com/<br />
<br />
--><img id="Codehighlighter1_0_38_Open_Image" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_0_38_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_0_38_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_0_38_Closed_Text').style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align="top"><img id="Codehighlighter1_0_38_Closed_Image" style="display: none" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_0_38_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_0_38_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_0_38_Open_Text').style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" align="top"><span id="Codehighlighter1_0_38_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">/**/</span><span id="Codehighlighter1_0_38_Open_Text"><span style="color: #808080">/////////////////////////////////</span><span style="color: #008000">替换内容</span><span style="color: #808080"></span></span><br /><img alt="" src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" /><span style="color: #0000ff">byte</span><span style="color: #000000">[]&nbsp;x&nbsp;</span><span style="color: #000000">=</span><span style="color: #000000">&nbsp;System.Text.Encoding.GetEncoding(</span><span style="color: #800000">"</span><span style="color: #800000">GB2312</span><span style="color: #800000">"</span><span style="color: #000000">).GetBytes(FileName);<br /><img alt="" src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" />Int16&nbsp;filenameLength&nbsp;</span><span style="color: #000000">=</span><span style="color: #000000">&nbsp;(Int16)x.Length;<br /><img id="Codehighlighter1_152_190_Open_Image" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_152_190_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_152_190_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_152_190_Closed_Text').style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align="top"><img id="Codehighlighter1_152_190_Closed_Image" style="display: none" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_152_190_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_152_190_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_152_190_Open_Text').style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" align="top"></span><span id="Codehighlighter1_152_190_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">/**/</span><span id="Codehighlighter1_152_190_Open_Text"><span style="color: #808080">//////////////////////////////</span><span style="color: #008000">//被替换内容</span><span style="color: #808080"></span></span><br /><img alt="" src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" /><span style="color: #008000">//</span><span style="color: #008000">&nbsp;filename&nbsp;length&nbsp;(Int16)<br /><img alt="" src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" /></span><span style="color: #008000">//</span><span style="color: #008000">Int16&nbsp;filenameLength&nbsp;=&nbsp;(Int16)FileName.Length;</span><span style="color: #008000"><br /><img id="Codehighlighter1_266_299_Open_Image" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_266_299_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_266_299_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_266_299_Closed_Text').style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align="top"><img id="Codehighlighter1_266_299_Closed_Image" style="display: none" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_266_299_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_266_299_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_266_299_Open_Text').style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" align="top"></span><span id="Codehighlighter1_266_299_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">/**/</span><span id="Codehighlighter1_266_299_Open_Text"><span style="color: #808080">//////////////////////////////</span><span style="color: #008000">//</span><span style="color: #808080"></span></span><br /><img alt="" src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" /></span></div>FileName.Length<span style="font-family: 宋体">不论遇到一个汉字还是一个字母数字</span>,<span style="font-family: 宋体">都是返回</span>1,<span style="font-family: 宋体">而一个汉字却占两个字节</span>,<span style="font-family: 宋体">可能问题出在这儿</span>,<span style="font-family: 宋体">再进一步地跟踪</span>,<span style="font-family: 宋体">果然发现问题</span> 
<p>&nbsp;</p>
<p><span style="font-family: 宋体"></p>
<div class="cnblogs_code"><img id="Code_Closed_Image_104634" onclick="this.style.display='none'; document.getElementById('Code_Closed_Text_104634').style.display='none'; document.getElementById('Code_Open_Image_104634').style.display='inline'; document.getElementById('Code_Open_Text_104634').style.display='inline';" height="16" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" width="11" align="top"><img id="Code_Open_Image_104634" style="display: none" onclick="this.style.display='none'; document.getElementById('Code_Open_Text_104634').style.display='none'; getElementById('Code_Closed_Image_104634').style.display='inline'; getElementById('Code_Closed_Text_104634').style.display='inline';" height="16" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" width="11" align="top"><span class="cnblogs_code_Collapse" id="Code_Closed_Text_104634">Code</span><span id="Code_Open_Text_104634" style="display: none"><br /><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #008080">&nbsp;1</span><img id="Codehighlighter1_0_30_Open_Image" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_0_30_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_0_30_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_0_30_Closed_Text').style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align="top"><img id="Codehighlighter1_0_30_Closed_Image" style="display: none" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_0_30_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_0_30_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_0_30_Open_Text').style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" align="top"><span id="Codehighlighter1_0_30_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">/**/</span><span id="Codehighlighter1_0_30_Open_Text"><span style="color: #808080">////////////////////////</span><span style="color: #008000">/替换内容</span><span style="color: #808080"></span></span><br /><span style="color: #008080">&nbsp;2</span><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top"  alt="" /><span style="color: #0000ff">for</span><span style="color: #000000">&nbsp;(j&nbsp;</span><span style="color: #000000">=</span><span style="color: #000000">&nbsp;</span><span style="color: #800080">0</span><span style="color: #000000">;&nbsp;(j&nbsp;</span><span style="color: #000000">&lt;</span><span style="color: #000000">&nbsp;x.Length)&nbsp;</span><span style="color: #000000">&amp;&amp;</span><span style="color: #000000">&nbsp;(i&nbsp;</span><span style="color: #000000">+</span><span style="color: #000000">&nbsp;j&nbsp;</span><span style="color: #000000">&lt;</span><span style="color: #000000">&nbsp;bytes.Length);&nbsp;j</span><span style="color: #000000">++</span><span style="color: #000000">)<br /></span><span style="color: #008080">&nbsp;3</span><span style="color: #000000"><img id="Codehighlighter1_89_180_Open_Image" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_89_180_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_89_180_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_89_180_Closed_Text').style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align="top"><img id="Codehighlighter1_89_180_Closed_Image" style="display: none" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_89_180_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_89_180_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_89_180_Open_Text').style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" align="top"></span><span id="Codehighlighter1_89_180_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.cnblogs.com/Images/dot.gif"  alt="" /></span><span id="Codehighlighter1_89_180_Open_Text"><span style="color: #000000">{<br /></span><span style="color: #008080">&nbsp;4</span><span style="color: #000000"><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align="top"  alt="" />&nbsp;&nbsp;&nbsp;&nbsp;bytes[i&nbsp;</span><span style="color: #000000">+</span><span style="color: #000000">&nbsp;j]&nbsp;</span><span style="color: #000000">=</span><span style="color: #000000">&nbsp;x[j];<br /></span><span style="color: #008080">&nbsp;5</span><span style="color: #000000"><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align="top"  alt="" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff">if</span><span style="color: #000000">&nbsp;(_Debug)&nbsp;System.Console.Write(</span><span style="color: #800000">"</span><span style="color: #800000">&nbsp;{0:X2}</span><span style="color: #800000">"</span><span style="color: #000000">,&nbsp;bytes[i&nbsp;</span><span style="color: #000000">+</span><span style="color: #000000">&nbsp;j]);<br /></span><span style="color: #008080">&nbsp;6</span><span style="color: #000000"><img src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align="top"  alt="" />}</span></span><span style="color: #000000"><br /></span><span style="color: #008080">&nbsp;7</span><span style="color: #000000"><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top"  alt="" /></span><span style="color: #0000ff">if</span><span style="color: #000000">&nbsp;(_Debug)&nbsp;System.Console.WriteLine();<br /></span><span style="color: #008080">&nbsp;8</span><span style="color: #000000"><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top"  alt="" /><br /></span><span style="color: #008080">&nbsp;9</span><span style="color: #000000"><img id="Codehighlighter1_222_252_Open_Image" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_222_252_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_222_252_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_222_252_Closed_Text').style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align="top"><img id="Codehighlighter1_222_252_Closed_Image" style="display: none" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_222_252_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_222_252_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_222_252_Open_Text').style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" align="top"></span><span id="Codehighlighter1_222_252_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">/**/</span><span id="Codehighlighter1_222_252_Open_Text"><span style="color: #808080">////////////////////////</span><span style="color: #008000">被替换内容</span><span style="color: #808080"></span></span><br /><span style="color: #008080">10</span><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top"  alt="" /><span style="color: #000000"><br /></span><span style="color: #008080">11</span><span style="color: #000000"><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top"  alt="" /></span><span style="color: #008000">//</span><span style="color: #008000">for&nbsp;(j&nbsp;=&nbsp;0;&nbsp;(j&nbsp;&lt;&nbsp;c.Length)&nbsp;&amp;&amp;&nbsp;(i&nbsp;+&nbsp;j&nbsp;&lt;&nbsp;bytes.Length);&nbsp;j++)<br /></span><span style="color: #008080">12</span><span style="color: #008000"><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top"  alt="" /></span><span style="color: #008000">//</span><span style="color: #008000">{<br /></span><span style="color: #008080">13</span><span style="color: #008000"><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top"  alt="" /></span><span style="color: #008000">//</span><span style="color: #008000">&nbsp;&nbsp;&nbsp;&nbsp;bytes[i&nbsp;+&nbsp;j]&nbsp;=&nbsp;System.BitConverter.GetBytes(c[j])[0];<br /></span><span style="color: #008080">14</span><span style="color: #008000"><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top"  alt="" /></span><span style="color: #008000">//</span><span style="color: #008000">&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(_Debug)&nbsp;System.Console.Write("&nbsp;{0:X2}",&nbsp;bytes[i&nbsp;+&nbsp;j]);<br /></span><span style="color: #008080">15</span><span style="color: #008000"><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top"  alt="" /></span><span style="color: #008000">//</span><span style="color: #008000">}<br /></span><span style="color: #008080">16</span><span style="color: #008000"><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top"  alt="" /></span><span style="color: #008000">//</span><span style="color: #008000">if&nbsp;(_Debug)&nbsp;System.Console.WriteLine();</span><span style="color: #008000"><br /></span><span style="color: #008080">17</span><span style="color: #008000"><img id="Codehighlighter1_489_513_Open_Image" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_489_513_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_489_513_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_489_513_Closed_Text').style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align="top"><img id="Codehighlighter1_489_513_Closed_Image" style="display: none" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_489_513_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_489_513_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_489_513_Open_Text').style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" align="top"></span><span id="Codehighlighter1_489_513_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">/**/</span><span id="Codehighlighter1_489_513_Open_Text"><span style="color: #808080">////////////////////////</span></span></span></div>
<p>程序大意是将文件名称转换为字符数组</span>,<span style="font-family: 宋体">再将字符数组压缩为字节数组</span>,<span style="font-family: 宋体">而一个字符中只有一个汉字</span>,<span style="font-family: 宋体">压缩完之后只有一个字节</span>,<span style="font-family: 宋体">而一个字节是无法表示汉字的</span>,<span style="font-family: 宋体">所以</span>,<span style="font-family: 宋体">我先采用</span>GetBytes<span style="font-family: 宋体">直接生成字节数组</span>,<span style="font-family: 宋体">获得字符串的真实长度</span>[<span style="font-family: 宋体">即汉字为</span>2,<span style="font-family: 宋体">字母数字为</span>1],<span style="font-family: 宋体">然后将字节数组逐个拷至目的字节数组</span>,<span style="font-family: 宋体">编译运行</span>,<span style="font-family: 宋体">中文名称果然顺利显示出来了</span>!!!</p>
<p>&nbsp;<span style="font-family: 宋体">问题好象是解决了</span>,<span style="font-family: 宋体">可是当解压时</span>,<span style="font-family: 宋体">却傻眼了</span>,<span style="font-family: 宋体">都是些乱码</span>.<span style="font-family: 宋体">不过有了上次的调试经验</span>,<span style="font-family: 宋体">不需要辛苦跟踪了</span>,<span style="font-family: 宋体">知道问题出在读</span>Header<span style="font-family: 宋体">的地方</span>,<span style="font-family: 宋体">果然在</span>ZipEntry<span style="font-family: 宋体">类中</span>,<span style="font-family: 宋体">有</span>ReadHeader<span style="font-family: 宋体">方法</span>,<span style="font-family: 宋体">设断点</span>,<span style="font-family: 宋体">调试</span>,<span style="font-family: 宋体">最后定位于</span>Shared<span style="font-family: 宋体">类中的</span>StringFromBuffer<span style="font-family: 宋体">方法</span><span style="font-size: 10.5pt; font-family: 宋体"></p>
<div class="cnblogs_code"><img id="Code_Closed_Image_104803" onclick="this.style.display='none'; document.getElementById('Code_Closed_Text_104803').style.display='none'; document.getElementById('Code_Open_Image_104803').style.display='inline'; document.getElementById('Code_Open_Text_104803').style.display='inline';" height="16" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" width="11" align="top"><img id="Code_Open_Image_104803" style="display: none" onclick="this.style.display='none'; document.getElementById('Code_Open_Text_104803').style.display='none'; getElementById('Code_Closed_Image_104803').style.display='inline'; getElementById('Code_Closed_Text_104803').style.display='inline';" height="16" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" width="11" align="top"><span class="cnblogs_code_Collapse" id="Code_Closed_Text_104803">Code</span><span id="Code_Open_Text_104803" style="display: none"><br /><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #008080">&nbsp;1</span><img id="Codehighlighter1_0_30_Open_Image" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_0_30_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_0_30_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_0_30_Closed_Text').style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align="top"><img id="Codehighlighter1_0_30_Closed_Image" style="display: none" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_0_30_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_0_30_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_0_30_Open_Text').style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" align="top"><span id="Codehighlighter1_0_30_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">/**/</span><span id="Codehighlighter1_0_30_Open_Text"><span style="color: #808080">////////////////////////</span><span style="color: #008000">/替换内容</span><span style="color: #808080"></span></span><br /><span style="color: #008080">&nbsp;2</span><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top"  alt="" /><span style="color: #0000ff">string</span><span style="color: #000000">&nbsp;str2&nbsp;</span><span style="color: #000000">=</span><span style="color: #000000">&nbsp;System.Text.Encoding.GetEncoding(</span><span style="color: #800000">"</span><span style="color: #800000">GB2312</span><span style="color: #800000">"</span><span style="color: #000000">).GetString(buf,&nbsp;start,&nbsp;maxlength);<br /></span><span style="color: #008080">&nbsp;3</span><span style="color: #000000"><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top"  alt="" /></span><span style="color: #0000ff">return</span><span style="color: #000000">&nbsp;str2;<br /></span><span style="color: #008080">&nbsp;4</span><span style="color: #000000"><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top"  alt="" /><br /></span><span style="color: #008080">&nbsp;5</span><span style="color: #000000"><img id="Codehighlighter1_135_165_Open_Image" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_135_165_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_135_165_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_135_165_Closed_Text').style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align="top"><img id="Codehighlighter1_135_165_Closed_Image" style="display: none" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_135_165_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_135_165_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_135_165_Open_Text').style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" align="top"></span><span id="Codehighlighter1_135_165_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">/**/</span><span id="Codehighlighter1_135_165_Open_Text"><span style="color: #808080">////////////////////////</span><span style="color: #008000">被替换内容</span><span style="color: #808080"></span></span><br /><span style="color: #008080">&nbsp;6</span><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top"  alt="" /><span style="color: #008000">//</span><span style="color: #008000">int&nbsp;i;<br /></span><span style="color: #008080">&nbsp;7</span><span style="color: #008000"><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top"  alt="" /></span><span style="color: #008000">//</span><span style="color: #008000">char[]&nbsp;c&nbsp;=&nbsp;new&nbsp;char[maxlength];<br /></span><span style="color: #008080">&nbsp;8</span><span style="color: #008000"><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top"  alt="" /></span><span style="color: #008000">//</span><span style="color: #008000">for&nbsp;(i&nbsp;=&nbsp;0;&nbsp;(i&nbsp;&lt;&nbsp;maxlength)&nbsp;&amp;&amp;&nbsp;(i&nbsp;&lt;&nbsp;buf.Length)&nbsp;&amp;&amp;&nbsp;(buf[i]&nbsp;!=&nbsp;0);&nbsp;i++)<br /></span><span style="color: #008080">&nbsp;9</span><span style="color: #008000"><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top"  alt="" /></span><span style="color: #008000">//</span><span style="color: #008000">{<br /></span><span style="color: #008080">10</span><span style="color: #008000"><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top"  alt="" /></span><span style="color: #008000">//</span><span style="color: #008000">&nbsp;&nbsp;&nbsp;&nbsp;c[i]&nbsp;=&nbsp;(char)buf[i];&nbsp;</span><span style="color: #008000">//</span><span style="color: #008000">&nbsp;System.BitConverter.ToChar(buf,&nbsp;start+i*2);<br /></span><span style="color: #008080">11</span><span style="color: #008000"><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top"  alt="" /></span><span style="color: #008000">//</span><span style="color: #008000">}<br /></span><span style="color: #008080">12</span><span style="color: #008000"><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top"  alt="" /></span><span style="color: #008000">//</span><span style="color: #008000">string&nbsp;s&nbsp;=&nbsp;new&nbsp;System.String(c,&nbsp;0,&nbsp;i);<br /></span><span style="color: #008080">13</span><span style="color: #008000"><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top"  alt="" /></span><span style="color: #008000">//</span><span style="color: #008000">return&nbsp;s;</span><span style="color: #008000"><br /></span><span style="color: #008080">14</span><span style="color: #008000"><img id="Codehighlighter1_416_441_Open_Image" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_416_441_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_416_441_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_416_441_Closed_Text').style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align="top"><img id="Codehighlighter1_416_441_Closed_Image" style="display: none" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_416_441_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_416_441_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_416_441_Open_Text').style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" align="top"></span><span id="Codehighlighter1_416_441_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">/**/</span><span id="Codehighlighter1_416_441_Open_Text"><span style="color: #808080">////////////////////////</span><span style="color: #008000">&nbsp;</span></span></span></div>
<p>这个方法大意是</span><span style="font-size: 10.5pt; font-family: 'Times New Roman'">,</span><span style="font-size: 10.5pt; font-family: 宋体">将字节数组逐个转换为字符数组</span><span style="font-size: 10.5pt; font-family: 'Times New Roman'">,</span><span style="font-size: 10.5pt; font-family: 宋体">将汉字的编码拆成两个字符</span><span style="font-size: 10.5pt; font-family: 'Times New Roman'">,</span><span style="font-size: 10.5pt; font-family: 宋体">这很明显会造成乱码</span><span style="font-size: 10.5pt; font-family: 'Times New Roman'">,</span><span style="font-size: 10.5pt; font-family: 宋体">既然编码采用</span><span style="font-size: 10.5pt; font-family: 'Times New Roman'">GetBytes,</span><span style="font-size: 10.5pt; font-family: 宋体">那么解码也就用反的</span><span style="font-size: 10.5pt; font-family: 'Times New Roman'">,GetString</span><span style="font-size: 10.5pt; font-family: 宋体">就行了</span><span style="font-size: 10.5pt; font-family: 'Times New Roman'">,</span><span style="font-size: 10.5pt; font-family: 宋体">编译运行</span><span style="font-size: 10.5pt; font-family: 'Times New Roman'">,</span><span style="font-size: 10.5pt; font-family: 宋体">大功告成</span><span style="font-size: 10.5pt; font-family: 'Times New Roman'">!!<br />源代码下载:<a href="http://files.cnblogs.com/redleaf1995/DotNetZip.rar" target="_blank">http://files.cnblogs.com/redleaf1995/DotNetZip.rar</a></span></p><img src="http://www.cnblogs.com/redleaf1995/aggbug/1587908.html?type=1" width="1" height="1" alt=""/><p>评论: 7　<a href="http://www.cnblogs.com/redleaf1995/archive/2009/10/22/1587908.html#pagedcomment" target="_blank">查看评论</a>　<a href="http://www.cnblogs.com/redleaf1995/archive/2009/10/22/1587908.html#commentform" target="_blank">发表评论</a></p><hr/><p>最新新闻：<br/>· <a href="http://news.cnblogs.com/n/56857/" target="_blank">Facebook与美国在线合作 整合AIM动态功能</a><span style="color:gray">(2010-02-10 16:41)</span><br/>· <a href="http://news.cnblogs.com/n/56855/" target="_blank">NDepend 3.0已与Visual Studio集成</a><span style="color:gray">(2010-02-10 16:17)</span><br/>· <a href="http://news.cnblogs.com/n/56854/" target="_blank">Ruby in Steel 1.5发布，去除IronRuby支持</a><span style="color:gray">(2010-02-10 16:14)</span><br/>· <a href="http://news.cnblogs.com/n/56852/" target="_blank">淘宝网通过索引模式涉足网络文学</a><span style="color:gray">(2010-02-10 15:59)</span><br/>· <a href="http://news.cnblogs.com/n/56851/" target="_blank">苹果发布 iPhone/iPad SDK 3.2 beta2 开发包</a><span style="color:gray">(2010-02-10 15:37)</span><br/></p><p>编辑推荐：<a href="http://news.cnblogs.com/news/tag/Buzz/" target="_blank">Google Buzz相关新闻</a><br/></p><p>网站导航：<a href="http://www.cnblogs.com" target="_blank">博客园首页</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/" target="_blank">个人主页</a>&nbsp;&nbsp;<a href="http://news.cnblogs.com" target="_blank">新闻</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/ing/" target="_blank">闪存</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/group/" target="_blank">小组</a>&nbsp;&nbsp;<a href="http://space.cnblogs.com/q/" target="_blank">博问</a>&nbsp;&nbsp;<a href="http://space.cnblogs.com" target="_blank">社区</a>&nbsp;&nbsp;<a href="http://kb.cnblogs.com" target="_blank">知识库</a></p>]]></description></item><item><title>用javascript实现既能禁止页面鼠标右键查看 同时又能查看页面文本框右键菜单</title><link>http://www.cnblogs.com/redleaf1995/archive/2008/04/25/1170693.html</link><dc:creator>红色枫叶</dc:creator><author>红色枫叶</author><pubDate>Fri, 25 Apr 2008 03:02:00 GMT</pubDate><guid>http://www.cnblogs.com/redleaf1995/archive/2008/04/25/1170693.html</guid><description><![CDATA[<p>阅读: 856 评论: 3 作者: <a href="http://www.cnblogs.com/redleaf1995/" target="_blank">红色枫叶</a> 发表于 2008-04-25 11:02 <a href="http://www.cnblogs.com/redleaf1995/archive/2008/04/25/1170693.html" target="_blank">原文链接</a></p>在CSDN上，看到有人问这个问题。就是若把页面右键屏蔽的话，文本框上的右键菜单同样也给屏蔽，问如何能够将文本框的右键菜单显示出来。<br />
解决思路：首先，要在页面初始化时将页面右键菜单屏蔽<br />
其
次，在欲解除右键限制的文本框获得焦点时，启用页面document的右键菜单。可以用在文本框中的onmousedown事件中，但推荐用在
onfocus事件中，若使用的onmousedown的话，则按键盘上摸拟右键的按键(在右win键右边)不响应；若用onfocus事件，则能顺利响
应。<br />
最后，当该文本框失去焦点时，需将页面document的右键菜单屏蔽，用文本框的onblur事件即可。<br />
要注意的是IE和Firefox的兼容性问题:<br />
页面初始化时，若使用这样的语句<br />
<div style="border: 0.5pt solid windowtext; padding: 4px 5.4pt; background: #e6e6e6 none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 95%;">
<div><img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">body&nbsp;</span><span style="color: #ff0000;">oncontextmenu</span><span style="color: #0000ff;">="return&nbsp;false;"</span><span style="color: #0000ff;">&gt;</span></div>
</div>
<br />
则在IE中没有影响，但Firefox中文本框右键菜单不能显示。<br />
使用下列语句：<br />
<div style="border: 0.5pt solid windowtext; padding: 4px 5.4pt; background: #e6e6e6 none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 95%;">
<div><img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">body&nbsp;</span><span style="color: #ff0000;">onload</span><span style="color: #0000ff;">="hidemenu();"</span><span style="color: #0000ff;">&gt;</span></div>
</div>
<br />
将oncontext处理代码写在函数中,IE和Firefox中均能正常响应。<br />
下面是测试页面的源代码：<br />
<div style="border: 0.5pt solid windowtext; padding: 4px 5.4pt; background: #e6e6e6 none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 95%;">
<div><img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" 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 />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" 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 />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" 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;">屏蔽页面右键,但不屏蔽某HTML元素的右键响应</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">title</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img onclick="this.style.display='none'; document.getElementById('_83_244_Open_Text').style.display='none'; document.getElementById('_83_244_Closed_Image').style.display='inline'; document.getElementById('_83_244_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" id="_83_244_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_83_244_Closed_Text').style.display='none'; document.getElementById('_83_244_Open_Image').style.display='inline'; document.getElementById('_83_244_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" id="_83_244_Closed_Image" alt="" 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="_83_244_Open_Text"><span style="background-color: #f5f5f5; color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">function</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;hidemenu()<br />
<img onclick="this.style.display='none'; document.getElementById('_106_162_Open_Text').style.display='none'; document.getElementById('_106_162_Closed_Image').style.display='inline'; document.getElementById('_106_162_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_106_162_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_106_162_Closed_Text').style.display='none'; document.getElementById('_106_162_Open_Image').style.display='inline'; document.getElementById('_106_162_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_106_162_Closed_Image" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_106_162_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{<br />
<img onclick="this.style.display='none'; document.getElementById('_145_159_Open_Text').style.display='none'; document.getElementById('_145_159_Closed_Image').style.display='inline'; document.getElementById('_145_159_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_145_159_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_145_159_Closed_Text').style.display='none'; document.getElementById('_145_159_Open_Image').style.display='inline'; document.getElementById('_145_159_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_145_159_Closed_Image" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;document.oncontextmenu&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span>&nbsp;<span style="background-color: #f5f5f5; color: #0000ff;">function</span><span style="background-color: #f5f5f5; color: #000000;">()</span><span id="_145_159_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{</span><span style="background-color: #f5f5f5; color: #0000ff;">return</span>&nbsp;<span style="background-color: #f5f5f5; color: #0000ff;">false</span><span style="background-color: #f5f5f5; color: #000000;">;}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">function</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;showmenu()<br />
<img onclick="this.style.display='none'; document.getElementById('_188_243_Open_Text').style.display='none'; document.getElementById('_188_243_Closed_Image').style.display='inline'; document.getElementById('_188_243_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_188_243_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_188_243_Closed_Text').style.display='none'; document.getElementById('_188_243_Open_Image').style.display='inline'; document.getElementById('_188_243_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_188_243_Closed_Image" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_188_243_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{<br />
<img onclick="this.style.display='none'; document.getElementById('_227_240_Open_Text').style.display='none'; document.getElementById('_227_240_Closed_Image').style.display='inline'; document.getElementById('_227_240_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_227_240_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_227_240_Closed_Text').style.display='none'; document.getElementById('_227_240_Open_Image').style.display='inline'; document.getElementById('_227_240_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_227_240_Closed_Image" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;document.oncontextmenu&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span>&nbsp;<span style="background-color: #f5f5f5; color: #0000ff;">function</span><span style="background-color: #f5f5f5; color: #000000;">()</span><span id="_227_240_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{</span><span style="background-color: #f5f5f5; color: #0000ff;">return</span>&nbsp;<span style="background-color: #f5f5f5; color: #0000ff;">true</span><span style="background-color: #f5f5f5; color: #000000;">;}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" 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 />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" 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 />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">body&nbsp;</span><span style="color: #ff0000;">onload</span><span style="color: #0000ff;">="hidemenu();"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />响应右键:</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">input&nbsp;</span><span style="color: #ff0000;">type</span><span style="color: #0000ff;">="text"</span><span style="color: #ff0000;">&nbsp;id</span><span style="color: #0000ff;">="text1"</span><span style="color: #ff0000;">&nbsp;onfocus</span><span style="color: #0000ff;">="showmenu();"</span><span style="color: #ff0000;">&nbsp;onblur</span><span style="color: #0000ff;">="hidemenu();"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">br</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />不响应右键:</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">input&nbsp;</span><span style="color: #ff0000;">type</span><span style="color: #0000ff;">="text"</span><span style="color: #ff0000;">&nbsp;id</span><span style="color: #0000ff;">="text2"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" 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 />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">html</span><span style="color: #0000ff;">&gt;</span></div>
</div>
<br />
源代码: <a title="点击下载" target="_blank" href="http://www.cnblogs.com/Files/redleaf1995/right.rar">http://www.cnblogs.com/Files/redleaf1995/right.rar</a>
<img src="http://www.cnblogs.com/redleaf1995/aggbug/1170693.html?type=1" width="1" height="1" alt=""/><p>评论: 3　<a href="http://www.cnblogs.com/redleaf1995/archive/2008/04/25/1170693.html#pagedcomment" target="_blank">查看评论</a>　<a href="http://www.cnblogs.com/redleaf1995/archive/2008/04/25/1170693.html#commentform" target="_blank">发表评论</a></p><hr/><p>最新新闻：<br/>· <a href="http://news.cnblogs.com/n/56857/" target="_blank">Facebook与美国在线合作 整合AIM动态功能</a><span style="color:gray">(2010-02-10 16:41)</span><br/>· <a href="http://news.cnblogs.com/n/56855/" target="_blank">NDepend 3.0已与Visual Studio集成</a><span style="color:gray">(2010-02-10 16:17)</span><br/>· <a href="http://news.cnblogs.com/n/56854/" target="_blank">Ruby in Steel 1.5发布，去除IronRuby支持</a><span style="color:gray">(2010-02-10 16:14)</span><br/>· <a href="http://news.cnblogs.com/n/56852/" target="_blank">淘宝网通过索引模式涉足网络文学</a><span style="color:gray">(2010-02-10 15:59)</span><br/>· <a href="http://news.cnblogs.com/n/56851/" target="_blank">苹果发布 iPhone/iPad SDK 3.2 beta2 开发包</a><span style="color:gray">(2010-02-10 15:37)</span><br/></p><p>编辑推荐：<a href="http://news.cnblogs.com/news/tag/Buzz/" target="_blank">Google Buzz相关新闻</a><br/></p><p>网站导航：<a href="http://www.cnblogs.com" target="_blank">博客园首页</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/" target="_blank">个人主页</a>&nbsp;&nbsp;<a href="http://news.cnblogs.com" target="_blank">新闻</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/ing/" target="_blank">闪存</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/group/" target="_blank">小组</a>&nbsp;&nbsp;<a href="http://space.cnblogs.com/q/" target="_blank">博问</a>&nbsp;&nbsp;<a href="http://space.cnblogs.com" target="_blank">社区</a>&nbsp;&nbsp;<a href="http://kb.cnblogs.com" target="_blank">知识库</a></p>]]></description></item><item><title>javascript中验证日期和日期时间格式 </title><link>http://www.cnblogs.com/redleaf1995/archive/2008/04/24/1165647.html</link><dc:creator>红色枫叶</dc:creator><author>红色枫叶</author><pubDate>Thu, 24 Apr 2008 02:06:00 GMT</pubDate><guid>http://www.cnblogs.com/redleaf1995/archive/2008/04/24/1165647.html</guid><description><![CDATA[<p>阅读: 1653 评论: 0 作者: <a href="http://www.cnblogs.com/redleaf1995/" target="_blank">红色枫叶</a> 发表于 2008-04-24 10:06 <a href="http://www.cnblogs.com/redleaf1995/archive/2008/04/24/1165647.html" target="_blank">原文链接</a></p>在javascript中,我们经常要对日期格式加以判断,用正则表达式是最为快捷有效的,下面是验证日期格式(YYYY-MM-DD)和日期时间格式(YYYY-MM-DD hh:mm:ss)的正则表达式.<br />
<div style="border: 0.5pt solid windowtext; padding: 4px 5.4pt; background: rgb(230, 230, 230) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 95%;">
<div><img onclick="this.style.display='none'; document.getElementById('_28_30_Open_Text').style.display='none'; document.getElementById('_28_30_Closed_Image').style.display='inline'; document.getElementById('_28_30_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" id="_28_30_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_28_30_Closed_Text').style.display='none'; document.getElementById('_28_30_Open_Image').style.display='inline'; document.getElementById('_28_30_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" id="_28_30_Closed_Image" alt="" align="top" /><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">&nbsp;_reDataTime&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span>&nbsp;<span style="color: rgb(0, 0, 0);">/^</span><span style="color: rgb(0, 0, 0);">([</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">9</span><span style="color: rgb(0, 0, 0);">]d</span><span id="_28_30_Open_Text"><span style="color: rgb(0, 0, 0);">{</span><span style="color: rgb(0, 0, 0);">3</span><span style="color: rgb(0, 0, 0);">}</span></span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">((</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">?</span><span style="color: rgb(0, 0, 0);">[</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">9</span><span style="color: rgb(0, 0, 0);">])</span><span style="color: rgb(0, 0, 0);">|</span><span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">[</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">2</span><span style="color: rgb(0, 0, 0);">]))</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">((</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">[</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">9</span><span style="color: rgb(0, 0, 0);">])</span><span style="color: rgb(0, 0, 0);">|</span><span style="color: rgb(0, 0, 0);">([</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">2</span><span style="color: rgb(0, 0, 0);">]</span><span style="color: rgb(0, 0, 0);">?</span><span style="color: rgb(0, 0, 0);">d)</span><span style="color: rgb(0, 0, 0);">|</span><span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(0, 0, 0);">3</span><span style="color: rgb(0, 0, 0);">[</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">])))</span><span style="color: rgb(0, 0, 0);">?</span><span style="color: rgb(0, 0, 0);">$</span><span style="color: rgb(0, 0, 0);">/</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">日期格式,可为空</span><span style="color: rgb(0, 128, 0);"><br />
<img onclick="this.style.display='none'; document.getElementById('_134_136_Open_Text').style.display='none'; document.getElementById('_134_136_Closed_Image').style.display='inline'; document.getElementById('_134_136_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" id="_134_136_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_134_136_Closed_Text').style.display='none'; document.getElementById('_134_136_Open_Image').style.display='inline'; document.getElementById('_134_136_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" id="_134_136_Closed_Image" alt="" align="top" /></span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">&nbsp;_reTimeReg&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span>&nbsp;<span style="color: rgb(0, 0, 0);">/^</span><span style="color: rgb(0, 0, 0);">[</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">9</span><span style="color: rgb(0, 0, 0);">][</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">9</span><span style="color: rgb(0, 0, 0);">]</span><span id="_134_136_Open_Text"><span style="color: rgb(0, 0, 0);">{</span><span style="color: rgb(0, 0, 0);">3</span><span style="color: rgb(0, 0, 0);">}</span></span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">?</span><span style="color: rgb(0, 0, 0);">[</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">9</span><span style="color: rgb(0, 0, 0);">]</span><span style="color: rgb(0, 0, 0);">|</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">[</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">|</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">|</span><span style="color: rgb(0, 0, 0);">2</span><span style="color: rgb(0, 0, 0);">])</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">?</span><span style="color: rgb(0, 0, 0);">[</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">9</span><span style="color: rgb(0, 0, 0);">]</span><span style="color: rgb(0, 0, 0);">|</span><span style="color: rgb(0, 0, 0);">[</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">|</span><span style="color: rgb(0, 0, 0);">2</span><span style="color: rgb(0, 0, 0);">][</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">9</span><span style="color: rgb(0, 0, 0);">]</span><span style="color: rgb(0, 0, 0);">|</span><span style="color: rgb(0, 0, 0);">3</span><span style="color: rgb(0, 0, 0);">[</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">|</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">])s(</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">?</span><span style="color: rgb(0, 0, 0);">[</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">9</span><span style="color: rgb(0, 0, 0);">]</span><span style="color: rgb(0, 0, 0);">|</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">[</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">9</span><span style="color: rgb(0, 0, 0);">]</span><span style="color: rgb(0, 0, 0);">|</span><span style="color: rgb(0, 0, 0);">2</span><span style="color: rgb(0, 0, 0);">[</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">3</span><span style="color: rgb(0, 0, 0);">]):(</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">?</span><span style="color: rgb(0, 0, 0);">[</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">9</span><span style="color: rgb(0, 0, 0);">]</span><span style="color: rgb(0, 0, 0);">|</span><span style="color: rgb(0, 0, 0);">[</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">|</span><span style="color: rgb(0, 0, 0);">2</span><span style="color: rgb(0, 0, 0);">|</span><span style="color: rgb(0, 0, 0);">3</span><span style="color: rgb(0, 0, 0);">|</span><span style="color: rgb(0, 0, 0);">4</span><span style="color: rgb(0, 0, 0);">|</span><span style="color: rgb(0, 0, 0);">5</span><span style="color: rgb(0, 0, 0);">][</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">9</span><span style="color: rgb(0, 0, 0);">]):(</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">?</span><span style="color: rgb(0, 0, 0);">[</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">9</span><span style="color: rgb(0, 0, 0);">]</span><span style="color: rgb(0, 0, 0);">|</span><span style="color: rgb(0, 0, 0);">[</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">|</span><span style="color: rgb(0, 0, 0);">2</span><span style="color: rgb(0, 0, 0);">|</span><span style="color: rgb(0, 0, 0);">3</span><span style="color: rgb(0, 0, 0);">|</span><span style="color: rgb(0, 0, 0);">4</span><span style="color: rgb(0, 0, 0);">|</span><span style="color: rgb(0, 0, 0);">5</span><span style="color: rgb(0, 0, 0);">][</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">9</span><span style="color: rgb(0, 0, 0);">])$</span><span style="color: rgb(0, 0, 0);">/</span><span style="color: rgb(0, 0, 0);">;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">日期时间格式</span></div>
</div>
<br />
&nbsp; 下面验证某个字符串是否日期(时间)格式:<br />
<div style="border: 0.5pt solid windowtext; padding: 4px 5.4pt; background: rgb(230, 230, 230) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 95%;">
<div><img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;<span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">&nbsp;sdate&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span>&nbsp;<span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">2002/01/23</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(sdate&nbsp;</span><span style="color: rgb(0, 0, 0);">!=</span>&nbsp;<span style="color: rgb(0, 0, 0);">""</span>&nbsp;<span style="color: rgb(0, 0, 0);">&amp;&amp;</span><span style="color: rgb(0, 0, 0);">&nbsp;_reDataTime.test(sdate))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">日期格式</span><span style="color: rgb(0, 128, 0);"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alert(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">date</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: rgb(0, 0, 255);">else</span>&nbsp;<span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(_reTimeReg.test(datetime.inputValue))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">日期时间格式</span><span style="color: rgb(0, 128, 0);"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alert(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">datetime</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: rgb(0, 0, 255);">else</span><span style="color: rgb(0, 0, 0);"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alert(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">not&nbsp;date</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">); <br />
</span></div>
</div>
<img src="http://www.cnblogs.com/redleaf1995/aggbug/1165647.html?type=1" width="1" height="1" alt=""/><p>评论: 0　<a href="http://www.cnblogs.com/redleaf1995/archive/2008/04/24/1165647.html#pagedcomment" target="_blank">查看评论</a>　<a href="http://www.cnblogs.com/redleaf1995/archive/2008/04/24/1165647.html#commentform" target="_blank">发表评论</a></p><hr/><p>最新新闻：<br/>· <a href="http://news.cnblogs.com/n/56857/" target="_blank">Facebook与美国在线合作 整合AIM动态功能</a><span style="color:gray">(2010-02-10 16:41)</span><br/>· <a href="http://news.cnblogs.com/n/56855/" target="_blank">NDepend 3.0已与Visual Studio集成</a><span style="color:gray">(2010-02-10 16:17)</span><br/>· <a href="http://news.cnblogs.com/n/56854/" target="_blank">Ruby in Steel 1.5发布，去除IronRuby支持</a><span style="color:gray">(2010-02-10 16:14)</span><br/>· <a href="http://news.cnblogs.com/n/56852/" target="_blank">淘宝网通过索引模式涉足网络文学</a><span style="color:gray">(2010-02-10 15:59)</span><br/>· <a href="http://news.cnblogs.com/n/56851/" target="_blank">苹果发布 iPhone/iPad SDK 3.2 beta2 开发包</a><span style="color:gray">(2010-02-10 15:37)</span><br/></p><p>编辑推荐：<a href="http://news.cnblogs.com/news/tag/Buzz/" target="_blank">Google Buzz相关新闻</a><br/></p><p>网站导航：<a href="http://www.cnblogs.com" target="_blank">博客园首页</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/" target="_blank">个人主页</a>&nbsp;&nbsp;<a href="http://news.cnblogs.com" target="_blank">新闻</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/ing/" target="_blank">闪存</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/group/" target="_blank">小组</a>&nbsp;&nbsp;<a href="http://space.cnblogs.com/q/" target="_blank">博问</a>&nbsp;&nbsp;<a href="http://space.cnblogs.com" target="_blank">社区</a>&nbsp;&nbsp;<a href="http://kb.cnblogs.com" target="_blank">知识库</a></p>]]></description></item><item><title>一个javascript写的media player播放器 </title><link>http://www.cnblogs.com/redleaf1995/archive/2008/04/21/1163896.html</link><dc:creator>红色枫叶</dc:creator><author>红色枫叶</author><pubDate>Mon, 21 Apr 2008 06:46:00 GMT</pubDate><guid>http://www.cnblogs.com/redleaf1995/archive/2008/04/21/1163896.html</guid><description><![CDATA[<p>阅读: 786 评论: 1 作者: <a href="http://www.cnblogs.com/redleaf1995/" target="_blank">红色枫叶</a> 发表于 2008-04-21 14:46 <a href="http://www.cnblogs.com/redleaf1995/archive/2008/04/21/1163896.html" target="_blank">原文链接</a></p>&nbsp;界面较为简单，支持播放列表 。<br />
建立播放列表的步骤为：<br />
1)在文本框中输入媒体资源的地址，可以是HTTP地址，相对地址和绝对地址<br />
2)点击&#8220;添加到媒体列表&#8221;按钮，将媒体资源信息放到媒体列表中<br />
3)在媒体列表中，点击&#8220;添加&#8221;链接，将媒体加入到播放列表中<br />
4)重复若干遍，加入所有歌曲<br />
5)点击&#8220;播放选中的歌曲&#8220;，就开始播放 播放列表中的所有打勾的媒体文件<br />
<br />
完整代码如下：<br />
<div style="border: 0.5pt solid windowtext; padding: 4px 5.4pt; background: #e6e6e6 none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 95%;">
<div><img onclick="this.style.display='none'; document.getElementById('_30_3842_Open_Text').style.display='none'; document.getElementById('_30_3842_Closed_Image').style.display='inline'; document.getElementById('_30_3842_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" id="_30_3842_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_30_3842_Closed_Text').style.display='none'; document.getElementById('_30_3842_Open_Image').style.display='inline'; document.getElementById('_30_3842_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" id="_30_3842_Closed_Image" alt="" align="top" /><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="_30_3842_Open_Text"><span style="background-color: #f5f5f5; color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">function</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;el(objname)<br />
<img onclick="this.style.display='none'; document.getElementById('_54_100_Open_Text').style.display='none'; document.getElementById('_54_100_Closed_Image').style.display='inline'; document.getElementById('_54_100_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_54_100_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_54_100_Closed_Text').style.display='none'; document.getElementById('_54_100_Open_Image').style.display='inline'; document.getElementById('_54_100_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_54_100_Closed_Image" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_54_100_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">return</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;document.getElementById(objname);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #008000;">//</span><span style="background-color: #f5f5f5; color: #008000;">增加一首歌到播放器列表，这样，播放器放完一首歌之后，会继续放下一首</span><span style="background-color: #f5f5f5; color: #008000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #0000ff;">function</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;addmedia(url)<br />
<img onclick="this.style.display='none'; document.getElementById('_161_333_Open_Text').style.display='none'; document.getElementById('_161_333_Closed_Image').style.display='inline'; document.getElementById('_161_333_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_161_333_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_161_333_Closed_Text').style.display='none'; document.getElementById('_161_333_Open_Image').style.display='inline'; document.getElementById('_161_333_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_161_333_Closed_Image" alt="" align="top" /></span><span id="_161_333_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{&nbsp;&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #008000;">//</span><span style="background-color: #f5f5f5; color: #008000;">&nbsp;取得当前的播放列表</span><span style="background-color: #f5f5f5; color: #008000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;playlist</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">Player.currentPlaylist;</span><span style="background-color: #f5f5f5; color: #008000;">//</span><span style="background-color: #f5f5f5; color: #008000;">新建一个指定URL的Media。</span><span style="background-color: #f5f5f5; color: #008000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;currMedia&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;Player.newMedia(url);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #008000;">//</span><span style="background-color: #f5f5f5; color: #008000;">把新建的Media&nbsp;item添加到播放器列表</span><span style="background-color: #f5f5f5; color: #008000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;playlist.appendItem(currMedia);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" />}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #0000ff;">function</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;clearlist()<br />
<img onclick="this.style.display='none'; document.getElementById('_357_622_Open_Text').style.display='none'; document.getElementById('_357_622_Closed_Image').style.display='inline'; document.getElementById('_357_622_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_357_622_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_357_622_Closed_Text').style.display='none'; document.getElementById('_357_622_Open_Image').style.display='inline'; document.getElementById('_357_622_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_357_622_Closed_Image" alt="" align="top" /></span><span id="_357_622_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #008000;">//</span><span style="background-color: #f5f5f5; color: #008000;">Player.currentPlaylist.count返回列表中的歌曲数量</span><span style="background-color: #f5f5f5; color: #008000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">while</span><span style="background-color: #f5f5f5; color: #000000;">(Player.currentPlaylist.count</span><span style="background-color: #f5f5f5; color: #000000;">&gt;</span><span style="background-color: #f5f5f5; color: #000000;">0</span><span style="background-color: #f5f5f5; color: #000000;">)&nbsp;<br />
<img onclick="this.style.display='none'; document.getElementById('_458_609_Open_Text').style.display='none'; document.getElementById('_458_609_Closed_Image').style.display='inline'; document.getElementById('_458_609_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_458_609_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_458_609_Closed_Text').style.display='none'; document.getElementById('_458_609_Open_Image').style.display='inline'; document.getElementById('_458_609_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_458_609_Closed_Image" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_458_609_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;item&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">Player.currentPlaylist.item(Player.currentPlaylist.count</span><span style="background-color: #f5f5f5; color: #000000;">-</span><span style="background-color: #f5f5f5; color: #000000;">1</span><span style="background-color: #f5f5f5; color: #000000;">);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;Player.currentPlaylist.removeItem(item);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #008000;">//</span><span style="background-color: #f5f5f5; color: #008000;">从播放列表中删除项</span><span style="background-color: #f5f5f5; color: #008000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" />}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #008000;">//</span><span style="background-color: #f5f5f5; color: #008000;">清空播放列表</span><span style="background-color: #f5f5f5; color: #008000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #0000ff;">function</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;clearPlaylist()<br />
<img onclick="this.style.display='none'; document.getElementById('_658_862_Open_Text').style.display='none'; document.getElementById('_658_862_Closed_Image').style.display='inline'; document.getElementById('_658_862_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_658_862_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_658_862_Closed_Text').style.display='none'; document.getElementById('_658_862_Open_Image').style.display='inline'; document.getElementById('_658_862_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_658_862_Closed_Image" alt="" align="top" /></span><span id="_658_862_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;clearlist();<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;l_tb&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;el(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">tabPlayList</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;row_len&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;l_tb.rows.length;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">for</span><span style="background-color: #f5f5f5; color: #000000;">(</span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;i&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span>&nbsp;<span style="background-color: #f5f5f5; color: #000000;">0</span><span style="background-color: #f5f5f5; color: #000000;">;&nbsp;i&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">&lt;</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;row_len;&nbsp;i</span><span style="background-color: #f5f5f5; color: #000000;">++</span><span style="background-color: #f5f5f5; color: #000000;">)<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;l_tb.firstChild.removeChild(l_tb.firstChild.childNodes[</span><span style="background-color: #f5f5f5; color: #000000;">0</span><span style="background-color: #f5f5f5; color: #000000;">]);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" />}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #008000;">//</span><span style="background-color: #f5f5f5; color: #008000;">清空媒体列表</span><span style="background-color: #f5f5f5; color: #008000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #0000ff;">function</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;clearMedialist()<br />
<img onclick="this.style.display='none'; document.getElementById('_899_1078_Open_Text').style.display='none'; document.getElementById('_899_1078_Closed_Image').style.display='inline'; document.getElementById('_899_1078_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_899_1078_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_899_1078_Closed_Text').style.display='none'; document.getElementById('_899_1078_Open_Image').style.display='inline'; document.getElementById('_899_1078_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_899_1078_Closed_Image" alt="" align="top" /></span><span id="_899_1078_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;l_tb&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;el(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">tabMediaList</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;row_len&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;l_tb.rows.length;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">for</span><span style="background-color: #f5f5f5; color: #000000;">(</span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;i&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span>&nbsp;<span style="background-color: #f5f5f5; color: #000000;">0</span><span style="background-color: #f5f5f5; color: #000000;">;&nbsp;i&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">&lt;</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;row_len;&nbsp;i</span><span style="background-color: #f5f5f5; color: #000000;">++</span><span style="background-color: #f5f5f5; color: #000000;">)<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;l_tb.firstChild.removeChild(l_tb.firstChild.childNodes[</span><span style="background-color: #f5f5f5; color: #000000;">0</span><span style="background-color: #f5f5f5; color: #000000;">]);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" />}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #008000;">//</span><span style="background-color: #f5f5f5; color: #008000;">播放选中的歌曲</span><span style="background-color: #f5f5f5; color: #008000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #0000ff;">function</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;addSeletedSongToPlayList()<br />
<img onclick="this.style.display='none'; document.getElementById('_1126_1599_Open_Text').style.display='none'; document.getElementById('_1126_1599_Closed_Image').style.display='inline'; document.getElementById('_1126_1599_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_1126_1599_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_1126_1599_Closed_Text').style.display='none'; document.getElementById('_1126_1599_Open_Image').style.display='inline'; document.getElementById('_1126_1599_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_1126_1599_Closed_Image" alt="" align="top" /></span><span id="_1126_1599_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;clearlist();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;l_tb&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;el(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">tabPlayList</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;row_len&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;l_tb.rows.length;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">if</span><span style="background-color: #f5f5f5; color: #000000;">(row_len&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">==</span>&nbsp;<span style="background-color: #f5f5f5; color: #000000;">0</span><span style="background-color: #f5f5f5; color: #000000;">)<br />
<img onclick="this.style.display='none'; document.getElementById('_1230_1261_Open_Text').style.display='none'; document.getElementById('_1230_1261_Closed_Image').style.display='inline'; document.getElementById('_1230_1261_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_1230_1261_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_1230_1261_Closed_Text').style.display='none'; document.getElementById('_1230_1261_Open_Image').style.display='inline'; document.getElementById('_1230_1261_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_1230_1261_Closed_Image" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_1230_1261_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #008000;">//</span><span style="background-color: #f5f5f5; color: #008000;">alert("无歌曲");</span><span style="background-color: #f5f5f5; color: #008000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">return</span><span style="background-color: #f5f5f5; color: #000000;">;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">for</span><span style="background-color: #f5f5f5; color: #000000;">(</span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;i</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">0</span><span style="background-color: #f5f5f5; color: #000000;">;i</span><span style="background-color: #f5f5f5; color: #000000;">&lt;</span><span style="background-color: #f5f5f5; color: #000000;">row_len;i</span><span style="background-color: #f5f5f5; color: #000000;">++</span><span style="background-color: #f5f5f5; color: #000000;">)<br />
<img onclick="this.style.display='none'; document.getElementById('_1306_1473_Open_Text').style.display='none'; document.getElementById('_1306_1473_Closed_Image').style.display='inline'; document.getElementById('_1306_1473_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_1306_1473_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_1306_1473_Closed_Text').style.display='none'; document.getElementById('_1306_1473_Open_Image').style.display='inline'; document.getElementById('_1306_1473_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_1306_1473_Closed_Image" alt="" align="top" />&nbsp;&nbsp;</span><span id="_1306_1473_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;check&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;l_tb.rows[i].cells[</span><span style="background-color: #f5f5f5; color: #000000;">0</span><span style="background-color: #f5f5f5; color: #000000;">].childNodes[</span><span style="background-color: #f5f5f5; color: #000000;">0</span><span style="background-color: #f5f5f5; color: #000000;">];<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;songname&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;l_tb.rows[i].cells[</span><span style="background-color: #f5f5f5; color: #000000;">1</span><span style="background-color: #f5f5f5; color: #000000;">].innerText;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">if</span><span style="background-color: #f5f5f5; color: #000000;">(check.checked</span><span style="background-color: #f5f5f5; color: #000000;">==</span><span style="background-color: #f5f5f5; color: #0000ff;">true</span><span style="background-color: #f5f5f5; color: #000000;">)<br />
<img onclick="this.style.display='none'; document.getElementById('_1440_1470_Open_Text').style.display='none'; document.getElementById('_1440_1470_Closed_Image').style.display='inline'; document.getElementById('_1440_1470_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_1440_1470_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_1440_1470_Closed_Text').style.display='none'; document.getElementById('_1440_1470_Open_Image').style.display='inline'; document.getElementById('_1440_1470_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_1440_1470_Closed_Image" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_1440_1470_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addmedia(songname);&nbsp;&nbsp;&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;SetPlayMode(el(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">setplay</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">).options[el(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">setplay</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">).selectedIndex].value)<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;Player.controls.play();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #008000;">//</span><span style="background-color: #f5f5f5; color: #008000;">让播放器开始播放</span><span style="background-color: #f5f5f5; color: #008000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #000000;">}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #008000;">//</span><span style="background-color: #f5f5f5; color: #008000;">添加文本输入框中的url到播放列表</span><span style="background-color: #f5f5f5; color: #008000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #0000ff;">function</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;addUrlToList()<br />
<img onclick="this.style.display='none'; document.getElementById('_1646_2190_Open_Text').style.display='none'; document.getElementById('_1646_2190_Closed_Image').style.display='inline'; document.getElementById('_1646_2190_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_1646_2190_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_1646_2190_Closed_Text').style.display='none'; document.getElementById('_1646_2190_Open_Image').style.display='inline'; document.getElementById('_1646_2190_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_1646_2190_Closed_Image" alt="" align="top" /></span><span id="_1646_2190_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #008000;">//</span><span style="background-color: #f5f5f5; color: #008000;">addmedia(document.getElementById("songURL").value&nbsp;);</span><span style="background-color: #f5f5f5; color: #008000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;l_tb&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;el(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">tabMediaList</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;row_len&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;l_tb.rows.length;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;tr&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;document.createElement(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">tr</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;td&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;document.createElement(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">td</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;strSong&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;el(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">songURL</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">).value;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;strHtml&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;strSong&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">+</span>&nbsp;<span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">&amp;nbsp;&lt;a&nbsp;href='#'&nbsp;onclick='addSong("</span><span style="background-color: #f5f5f5; color: #000000;">"</span>&nbsp;<span style="background-color: #f5f5f5; color: #000000;">+</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;strSong&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">+</span>&nbsp;<span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">");'&gt;添加&lt;/a&gt;</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;strHtml&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">+=</span>&nbsp;<span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">&amp;nbsp;&lt;a&nbsp;href='#'&nbsp;onclick='removeSong(this.parentElement.parentElement);'&gt;移除&lt;/a&gt;</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;td.innerHTML&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;strHtml;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;tr.appendChild(td);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;l_tb.firstChild.appendChild(tr);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;el(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">songURL</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">).value&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span>&nbsp;<span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">http://</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" />}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #008000;">//</span><span style="background-color: #f5f5f5; color: #008000;">添加文本输入框中的url到播放列表</span><span style="background-color: #f5f5f5; color: #008000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #0000ff;">function</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;addSong(strSongName)<br />
<img onclick="this.style.display='none'; document.getElementById('_2243_2832_Open_Text').style.display='none'; document.getElementById('_2243_2832_Closed_Image').style.display='inline'; document.getElementById('_2243_2832_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_2243_2832_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_2243_2832_Closed_Text').style.display='none'; document.getElementById('_2243_2832_Open_Image').style.display='inline'; document.getElementById('_2243_2832_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_2243_2832_Closed_Image" alt="" align="top" /></span><span id="_2243_2832_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;l_tb&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;el(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">tabPlayList</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;row_len&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;l_tb.rows.length;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;tr&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;document.createElement(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">tr</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;td&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;document.createElement(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">td</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;strChecked&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span>&nbsp;<span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">&lt;input&nbsp;type='checkbox'&nbsp;checked&nbsp;value='</span><span style="background-color: #f5f5f5; color: #000000;">"</span>&nbsp;<span style="background-color: #f5f5f5; color: #000000;">+</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;strSongName&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">+</span>&nbsp;<span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">'&gt;</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;td.innerHTML&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;strChecked;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;tr.appendChild(td);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;td&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;document.createElement(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">td</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;td.innerHTML&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;strSongName;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;tr.appendChild(td);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;td&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;document.createElement(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">td</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;strHtml&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span>&nbsp;<span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">&amp;nbsp;&lt;a&nbsp;href='#'&nbsp;onclick='removePlaySong(this.parentElement.parentElement);'&gt;移除&lt;/a&gt;</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;td.innerHTML&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;strHtml;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;tr.appendChild(td);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;l_tb.firstChild.appendChild(tr);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" />}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #008000;">//</span><span style="background-color: #f5f5f5; color: #008000;">从媒体列表删除</span><span style="background-color: #f5f5f5; color: #008000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #0000ff;">function</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;removeSong(tr)<br />
<img onclick="this.style.display='none'; document.getElementById('_2869_2937_Open_Text').style.display='none'; document.getElementById('_2869_2937_Closed_Image').style.display='inline'; document.getElementById('_2869_2937_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_2869_2937_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_2869_2937_Closed_Text').style.display='none'; document.getElementById('_2869_2937_Open_Image').style.display='inline'; document.getElementById('_2869_2937_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_2869_2937_Closed_Image" alt="" align="top" /></span><span id="_2869_2937_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;l_tb&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;el(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">tabMediaList</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;l_tb.firstChild.removeChild(tr);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" />}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #008000;">//</span><span style="background-color: #f5f5f5; color: #008000;">从播放列表删除</span><span style="background-color: #f5f5f5; color: #008000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #0000ff;">function</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;removePlaySong(tr)<br />
<img onclick="this.style.display='none'; document.getElementById('_2978_3045_Open_Text').style.display='none'; document.getElementById('_2978_3045_Closed_Image').style.display='inline'; document.getElementById('_2978_3045_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_2978_3045_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_2978_3045_Closed_Text').style.display='none'; document.getElementById('_2978_3045_Open_Image').style.display='inline'; document.getElementById('_2978_3045_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_2978_3045_Closed_Image" alt="" align="top" /></span><span id="_2978_3045_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;l_tb&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;el(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">tabPlayList</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;l_tb.firstChild.removeChild(tr);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" />}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #008000;">//</span><span style="background-color: #f5f5f5; color: #008000;">到指定位置播放</span><span style="background-color: #f5f5f5; color: #008000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #0000ff;">function</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;playposition()<br />
<img onclick="this.style.display='none'; document.getElementById('_3082_3190_Open_Text').style.display='none'; document.getElementById('_3082_3190_Closed_Image').style.display='inline'; document.getElementById('_3082_3190_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_3082_3190_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_3082_3190_Closed_Text').style.display='none'; document.getElementById('_3082_3190_Open_Image').style.display='inline'; document.getElementById('_3082_3190_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_3082_3190_Closed_Image" alt="" align="top" /></span><span id="_3082_3190_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;Player.controls.currentPosition&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;parseFloat(el(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">txtPosition</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">).value);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;el(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">txtPosition</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">).value&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span>&nbsp;<span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">1.0</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" />}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /><br />
<img onclick="this.style.display='none'; document.getElementById('_3213_3236_Open_Text').style.display='none'; document.getElementById('_3213_3236_Closed_Image').style.display='inline'; document.getElementById('_3213_3236_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_3213_3236_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_3213_3236_Closed_Text').style.display='none'; document.getElementById('_3213_3236_Open_Image').style.display='inline'; document.getElementById('_3213_3236_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_3213_3236_Closed_Image" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #0000ff;">function</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;StartMeUp()</span><span id="_3213_3236_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{Player.controls.play()}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img onclick="this.style.display='none'; document.getElementById('_3259_3282_Open_Text').style.display='none'; document.getElementById('_3259_3282_Closed_Image').style.display='inline'; document.getElementById('_3259_3282_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_3259_3282_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_3259_3282_Closed_Text').style.display='none'; document.getElementById('_3259_3282_Open_Image').style.display='inline'; document.getElementById('_3259_3282_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_3259_3282_Closed_Image" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #0000ff;">function</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;ShutMeDown()</span><span id="_3259_3282_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{Player.controls.stop()}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img onclick="this.style.display='none'; document.getElementById('_3300_3324_Open_Text').style.display='none'; document.getElementById('_3300_3324_Closed_Image').style.display='inline'; document.getElementById('_3300_3324_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_3300_3324_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_3300_3324_Closed_Text').style.display='none'; document.getElementById('_3300_3324_Open_Image').style.display='inline'; document.getElementById('_3300_3324_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_3300_3324_Closed_Image" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #0000ff;">function</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;Pause()</span><span id="_3300_3324_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{Player.controls.pause()}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img onclick="this.style.display='none'; document.getElementById('_3341_3364_Open_Text').style.display='none'; document.getElementById('_3341_3364_Closed_Image').style.display='inline'; document.getElementById('_3341_3364_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_3341_3364_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_3341_3364_Closed_Text').style.display='none'; document.getElementById('_3341_3364_Open_Image').style.display='inline'; document.getElementById('_3341_3364_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_3341_3364_Closed_Image" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #0000ff;">function</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;Next()</span><span id="_3341_3364_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{Player.controls.next()}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img onclick="this.style.display='none'; document.getElementById('_3381_3408_Open_Text').style.display='none'; document.getElementById('_3381_3408_Closed_Image').style.display='inline'; document.getElementById('_3381_3408_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_3381_3408_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_3381_3408_Closed_Text').style.display='none'; document.getElementById('_3381_3408_Open_Image').style.display='inline'; document.getElementById('_3381_3408_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_3381_3408_Closed_Image" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #0000ff;">function</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;Prev()</span><span id="_3381_3408_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{Player.controls.previous()}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img onclick="this.style.display='none'; document.getElementById('_3428_3458_Open_Text').style.display='none'; document.getElementById('_3428_3458_Closed_Image').style.display='inline'; document.getElementById('_3428_3458_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_3428_3458_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_3428_3458_Closed_Text').style.display='none'; document.getElementById('_3428_3458_Open_Image').style.display='inline'; document.getElementById('_3428_3458_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_3428_3458_Closed_Image" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #0000ff;">function</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;Forward()</span><span id="_3428_3458_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{Player.controls.fastForward()}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img onclick="this.style.display='none'; document.getElementById('_3478_3508_Open_Text').style.display='none'; document.getElementById('_3478_3508_Closed_Image').style.display='inline'; document.getElementById('_3478_3508_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_3478_3508_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_3478_3508_Closed_Text').style.display='none'; document.getElementById('_3478_3508_Open_Image').style.display='inline'; document.getElementById('_3478_3508_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_3478_3508_Closed_Image" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #0000ff;">function</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;reverse()</span><span id="_3478_3508_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{Player.controls.fastReverse()}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img onclick="this.style.display='none'; document.getElementById('_3537_3573_Open_Text').style.display='none'; document.getElementById('_3537_3573_Closed_Image').style.display='inline'; document.getElementById('_3537_3573_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_3537_3573_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_3537_3573_Closed_Text').style.display='none'; document.getElementById('_3537_3573_Open_Image').style.display='inline'; document.getElementById('_3537_3573_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_3537_3573_Closed_Image" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #0000ff;">function</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;SetPlayMode(value)</span><span id="_3537_3573_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{Player.settings.setMode(value,</span><span style="background-color: #f5f5f5; color: #0000ff;">true</span><span style="background-color: #f5f5f5; color: #000000;">)}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img onclick="this.style.display='none'; document.getElementById('_3603_3624_Open_Text').style.display='none'; document.getElementById('_3603_3624_Closed_Image').style.display='inline'; document.getElementById('_3603_3624_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_3603_3624_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_3603_3624_Closed_Text').style.display='none'; document.getElementById('_3603_3624_Open_Image').style.display='inline'; document.getElementById('_3603_3624_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_3603_3624_Closed_Image" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #0000ff;">function</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;ChangeuiMode(value)</span><span id="_3603_3624_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{Player.uiMode</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">value;}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img onclick="this.style.display='none'; document.getElementById('_3647_3841_Open_Text').style.display='none'; document.getElementById('_3647_3841_Closed_Image').style.display='inline'; document.getElementById('_3647_3841_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_3647_3841_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_3647_3841_Closed_Text').style.display='none'; document.getElementById('_3647_3841_Open_Image').style.display='inline'; document.getElementById('_3647_3841_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_3647_3841_Closed_Image" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #0000ff;">function</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;AjustSound()</span><span id="_3647_3841_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #0000ff;">if</span><span style="background-color: #f5f5f5; color: #000000;">(event.srcElement.name</span><span style="background-color: #f5f5f5; color: #000000;">==</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">turnup</span><span style="background-color: #f5f5f5; color: #000000;">"</span>&nbsp;<span style="background-color: #f5f5f5; color: #000000;">&amp;&amp;</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;Player.settings.volume</span><span style="background-color: #f5f5f5; color: #000000;">&lt;=</span><span style="background-color: #f5f5f5; color: #000000;">100</span><span style="background-color: #f5f5f5; color: #000000;">)<br />
<img onclick="this.style.display='none'; document.getElementById('_3716_3743_Open_Text').style.display='none'; document.getElementById('_3716_3743_Closed_Image').style.display='inline'; document.getElementById('_3716_3743_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_3716_3743_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_3716_3743_Closed_Text').style.display='none'; document.getElementById('_3716_3743_Open_Image').style.display='inline'; document.getElementById('_3716_3743_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_3716_3743_Closed_Image" alt="" align="top" /></span><span id="_3716_3743_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{Player.settings.volume</span><span style="background-color: #f5f5f5; color: #000000;">+=</span><span style="background-color: #f5f5f5; color: #000000;">10</span><span style="background-color: #f5f5f5; color: #000000;">}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #0000ff;">if</span><span style="background-color: #f5f5f5; color: #000000;">(event.srcElement.name</span><span style="background-color: #f5f5f5; color: #000000;">==</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">turndown</span><span style="background-color: #f5f5f5; color: #000000;">"</span>&nbsp;<span style="background-color: #f5f5f5; color: #000000;">&amp;&amp;</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;Player.settings.volume</span><span style="background-color: #f5f5f5; color: #000000;">&gt;=</span><span style="background-color: #f5f5f5; color: #000000;">0</span><span style="background-color: #f5f5f5; color: #000000;">)<br />
<img onclick="this.style.display='none'; document.getElementById('_3812_3839_Open_Text').style.display='none'; document.getElementById('_3812_3839_Closed_Image').style.display='inline'; document.getElementById('_3812_3839_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_3812_3839_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_3812_3839_Closed_Text').style.display='none'; document.getElementById('_3812_3839_Open_Image').style.display='inline'; document.getElementById('_3812_3839_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_3812_3839_Closed_Image" alt="" align="top" /></span><span id="_3812_3839_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{Player.settings.volume</span><span style="background-color: #f5f5f5; color: #000000;">-=</span><span style="background-color: #f5f5f5; color: #000000;">10</span><span style="background-color: #f5f5f5; color: #000000;">}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" alt="" align="top" />}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" 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 />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /><br />
<img onclick="this.style.display='none'; document.getElementById('_3921_4380_Open_Text').style.display='none'; document.getElementById('_3921_4380_Closed_Image').style.display='inline'; document.getElementById('_3921_4380_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" id="_3921_4380_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_3921_4380_Closed_Text').style.display='none'; document.getElementById('_3921_4380_Open_Image').style.display='inline'; document.getElementById('_3921_4380_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" id="_3921_4380_Closed_Image" alt="" align="top" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">SCRIPT&nbsp;</span><span style="color: #ff0000;">LANGUAGE&nbsp;&nbsp;</span><span style="color: #0000ff;">=&nbsp;"JScript"</span><span style="color: #ff0000;">&nbsp;FOR&nbsp;</span><span style="color: #0000ff;">=&nbsp;"Player"</span><span style="color: #ff0000;">&nbsp;EVENT&nbsp;</span><span style="color: #0000ff;">=&nbsp;"MediaChange"</span><span style="color: #0000ff;">&gt;</span><span id="_3921_4380_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">&nbsp;&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;el(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">spnCurrentMediaName</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">).innerText&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;Player.currentMedia.name;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;el(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">spnCurrentMediaDuration</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">).innerText&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;Player.currentMedia.durationString;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;el(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">spnCurrentMediaWidth</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">).innerText&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;Player.currentMedia.imageSourceWidth;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;el(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">spnCurrentMediaHeight</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">).innerText&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;Player.currentMedia.imageSourceHeight;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;el(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">spnCurrentMediaMarkerCount</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">).innerText&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;Player.currentMedia.markerCount;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" alt="" align="top" />&nbsp;&nbsp;el(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">spnCurrentSourceURL</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">).innerText&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;Player.currentMedia.sourceURL;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" 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 />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">object&nbsp;</span><span style="color: #ff0000;">id</span><span style="color: #0000ff;">="Player"</span><span style="color: #ff0000;">&nbsp;width</span><span style="color: #0000ff;">=300&nbsp;</span><span style="color: #ff0000;">height</span><span style="color: #0000ff;">=300&nbsp;</span><span style="color: #ff0000;">classid</span><span style="color: #0000ff;">="CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">param&nbsp;</span><span style="color: #ff0000;">name</span><span style="color: #0000ff;">="URL"</span><span style="color: #ff0000;">&nbsp;value</span><span style="color: #0000ff;">="test.wmv"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">param&nbsp;</span><span style="color: #ff0000;">name</span><span style="color: #0000ff;">="autoStart"</span><span style="color: #ff0000;">&nbsp;value</span><span style="color: #0000ff;">="1"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">param&nbsp;</span><span style="color: #ff0000;">name</span><span style="color: #0000ff;">="balance"</span><span style="color: #ff0000;">&nbsp;value</span><span style="color: #0000ff;">="0"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">param&nbsp;</span><span style="color: #ff0000;">name</span><span style="color: #0000ff;">="baseURL"</span><span style="color: #ff0000;">&nbsp;value</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">param&nbsp;</span><span style="color: #ff0000;">name</span><span style="color: #0000ff;">="captioningID"</span><span style="color: #ff0000;">&nbsp;value</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">param&nbsp;</span><span style="color: #ff0000;">name</span><span style="color: #0000ff;">="currentPosition"</span><span style="color: #ff0000;">&nbsp;value</span><span style="color: #0000ff;">="0"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">param&nbsp;</span><span style="color: #ff0000;">name</span><span style="color: #0000ff;">="currentMarker"</span><span style="color: #ff0000;">&nbsp;value</span><span style="color: #0000ff;">="0"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">param&nbsp;</span><span style="color: #ff0000;">name</span><span style="color: #0000ff;">="defaultFrame"</span><span style="color: #ff0000;">&nbsp;value</span><span style="color: #0000ff;">="0"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">param&nbsp;</span><span style="color: #ff0000;">name</span><span style="color: #0000ff;">="enabled"</span><span style="color: #ff0000;">&nbsp;value</span><span style="color: #0000ff;">="1"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">param&nbsp;</span><span style="color: #ff0000;">name</span><span style="color: #0000ff;">="enableErrorDialogs"</span><span style="color: #ff0000;">&nbsp;value</span><span style="color: #0000ff;">="0"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">param&nbsp;</span><span style="color: #ff0000;">name</span><span style="color: #0000ff;">="enableContextMenu"</span><span style="color: #ff0000;">&nbsp;value</span><span style="color: #0000ff;">="1"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">param&nbsp;</span><span style="color: #ff0000;">name</span><span style="color: #0000ff;">="fullScreen"</span><span style="color: #ff0000;">&nbsp;value</span><span style="color: #0000ff;">="0"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">param&nbsp;</span><span style="color: #ff0000;">name</span><span style="color: #0000ff;">="invokeURLs"</span><span style="color: #ff0000;">&nbsp;value</span><span style="color: #0000ff;">="1"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">param&nbsp;</span><span style="color: #ff0000;">name</span><span style="color: #0000ff;">="mute"</span><span style="color: #ff0000;">&nbsp;value</span><span style="color: #0000ff;">="0"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">param&nbsp;</span><span style="color: #ff0000;">name</span><span style="color: #0000ff;">="playCount"</span><span style="color: #ff0000;">&nbsp;value</span><span style="color: #0000ff;">="1"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">&nbsp;&nbsp;&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">param&nbsp;</span><span style="color: #ff0000;">name</span><span style="color: #0000ff;">="rate"</span><span style="color: #ff0000;">&nbsp;value</span><span style="color: #0000ff;">="1"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">param&nbsp;</span><span style="color: #ff0000;">name</span><span style="color: #0000ff;">="SAMIStyle"</span><span style="color: #ff0000;">&nbsp;value</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">param&nbsp;</span><span style="color: #ff0000;">name</span><span style="color: #0000ff;">="SAMILang"</span><span style="color: #ff0000;">&nbsp;value</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">param&nbsp;</span><span style="color: #ff0000;">name</span><span style="color: #0000ff;">="SAMIFilename"</span><span style="color: #ff0000;">&nbsp;value</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">param&nbsp;</span><span style="color: #ff0000;">name</span><span style="color: #0000ff;">="stretchToFit"</span><span style="color: #ff0000;">&nbsp;value</span><span style="color: #0000ff;">="0"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">param&nbsp;</span><span style="color: #ff0000;">name</span><span style="color: #0000ff;">="uiMode"</span><span style="color: #ff0000;">&nbsp;value</span><span style="color: #0000ff;">="full"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">param&nbsp;</span><span style="color: #ff0000;">name</span><span style="color: #0000ff;">="volume"</span><span style="color: #ff0000;">&nbsp;value</span><span style="color: #0000ff;">="100"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">param&nbsp;</span><span style="color: #ff0000;">name</span><span style="color: #0000ff;">="windowlessVideo"</span><span style="color: #ff0000;">&nbsp;value</span><span style="color: #0000ff;">="0"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">object</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">br</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">INPUT&nbsp;</span><span style="color: #ff0000;">TYPE</span><span style="color: #0000ff;">="BUTTON"</span><span style="color: #ff0000;">&nbsp;NAME</span><span style="color: #0000ff;">="BtnPlay"</span><span style="color: #ff0000;">&nbsp;VALUE</span><span style="color: #0000ff;">="播放"</span><span style="color: #ff0000;">&nbsp;OnClick</span><span style="color: #0000ff;">="StartMeUp()"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">INPUT&nbsp;</span><span style="color: #ff0000;">TYPE</span><span style="color: #0000ff;">="BUTTON"</span><span style="color: #ff0000;">&nbsp;NAME</span><span style="color: #0000ff;">="BtnStop"</span><span style="color: #ff0000;">&nbsp;VALUE</span><span style="color: #0000ff;">="停止"</span><span style="color: #ff0000;">&nbsp;OnClick</span><span style="color: #0000ff;">="ShutMeDown()"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">input&nbsp;</span><span style="color: #ff0000;">type</span><span style="color: #0000ff;">="BUTTON"</span><span style="color: #ff0000;">&nbsp;name</span><span style="color: #0000ff;">="BtnPause"</span><span style="color: #ff0000;">&nbsp;value</span><span style="color: #0000ff;">="暂停"</span><span style="color: #ff0000;">&nbsp;onClick</span><span style="color: #0000ff;">="Pause()"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">label</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">input&nbsp;</span><span style="color: #ff0000;">name</span><span style="color: #0000ff;">="turnup"</span><span style="color: #ff0000;">&nbsp;type</span><span style="color: #0000ff;">="button"</span><span style="color: #ff0000;">&nbsp;id</span><span style="color: #0000ff;">="turnup"</span><span style="color: #ff0000;">&nbsp;value</span><span style="color: #0000ff;">="+"</span><span style="color: #ff0000;">&nbsp;onClick</span><span style="color: #0000ff;">="AjustSound()"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;调节声音<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">label</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">input&nbsp;</span><span style="color: #ff0000;">name</span><span style="color: #0000ff;">="turndown"</span><span style="color: #ff0000;">&nbsp;type</span><span style="color: #0000ff;">="button"</span><span style="color: #ff0000;">&nbsp;id</span><span style="color: #0000ff;">="turndown"</span><span style="color: #ff0000;">&nbsp;value</span><span style="color: #0000ff;">="-"</span><span style="color: #ff0000;">&nbsp;onClick</span><span style="color: #0000ff;">="AjustSound()"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">br</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">input&nbsp;</span><span style="color: #ff0000;">type</span><span style="color: #0000ff;">="BUTTON"</span><span style="color: #ff0000;">&nbsp;name</span><span style="color: #0000ff;">="BtnNext"</span><span style="color: #ff0000;">&nbsp;value</span><span style="color: #0000ff;">="下一个"</span><span style="color: #ff0000;">&nbsp;onClick</span><span style="color: #0000ff;">="Next()"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">input&nbsp;</span><span style="color: #ff0000;">type</span><span style="color: #0000ff;">="BUTTON"</span><span style="color: #ff0000;">&nbsp;name</span><span style="color: #0000ff;">="BtnPrev"</span><span style="color: #ff0000;">&nbsp;value</span><span style="color: #0000ff;">="前一个"</span><span style="color: #ff0000;">&nbsp;onClick</span><span style="color: #0000ff;">="Prev()"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">INPUT&nbsp;</span><span style="color: #ff0000;">TYPE</span><span style="color: #0000ff;">="BUTTON"</span><span style="color: #ff0000;">&nbsp;NAME</span><span style="color: #0000ff;">="BtnForw"</span><span style="color: #ff0000;">&nbsp;VALUE</span><span style="color: #0000ff;">="快进"</span><span style="color: #ff0000;">&nbsp;OnClick</span><span style="color: #0000ff;">="Forward()"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">INPUT&nbsp;</span><span style="color: #ff0000;">TYPE</span><span style="color: #0000ff;">="BUTTON"</span><span style="color: #ff0000;">&nbsp;NAME</span><span style="color: #0000ff;">="BtnReve"</span><span style="color: #ff0000;">&nbsp;VALUE</span><span style="color: #0000ff;">="快退"</span><span style="color: #ff0000;">&nbsp;OnClick</span><span style="color: #0000ff;">="reverse()"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">br</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">label</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">播放模式</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">label</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">select&nbsp;</span><span style="color: #ff0000;">id</span><span style="color: #0000ff;">="setplay"</span><span style="color: #ff0000;">&nbsp;name</span><span style="color: #0000ff;">="setplay"</span><span style="color: #ff0000;">&nbsp;onChange</span><span style="color: #0000ff;">="SetPlayMode(this.options[this.selectedIndex].value)"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&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;">="loop"</span>&nbsp;<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 />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&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;">="shuffle"</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 />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" 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 />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">label</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">显示模式</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">label</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" 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;">="Changeui"</span><span style="color: #ff0000;">&nbsp;onChange</span><span style="color: #0000ff;">="ChangeuiMode(this.options[this.selectedIndex].value)"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&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;">="none"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">none</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">option</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&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;">="mini"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">mini</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">option</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&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;">="invisible"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">invisible</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">option</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&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;">="full"</span><span style="color: #ff0000;">&nbsp;selected</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">full</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">option</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" 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 />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">br</span><span style="color: #0000ff;">&gt;&lt;</span><span style="color: #800000;">br</span><span style="color: #0000ff;">&gt;&lt;</span><span style="color: #800000;">br</span><span style="color: #0000ff;">&gt;&lt;</span><span style="color: #800000;">br</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />媒体列表:</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">br</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">div&nbsp;</span><span style="color: #ff0000;">id&nbsp;</span><span style="color: #0000ff;">=&nbsp;"divMediaList"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">table&nbsp;</span><span style="color: #ff0000;">id</span><span style="color: #0000ff;">="tabMediaList"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">table</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">div</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">br</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />播放列表:</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">br</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">div&nbsp;</span><span style="color: #ff0000;">id</span><span style="color: #0000ff;">="divPlayList"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">table&nbsp;</span><span style="color: #ff0000;">id</span><span style="color: #0000ff;">="tabPlayList"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">table</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">div</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">br</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />当前播放媒体信息:</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">br</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />名称:</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">span&nbsp;</span><span style="color: #ff0000;">id</span><span style="color: #0000ff;">="spnCurrentMediaName"</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;">br</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />长度:</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">span&nbsp;</span><span style="color: #ff0000;">id</span><span style="color: #0000ff;">="spnCurrentMediaDuration"</span><span style="color: #0000ff;">&gt;&lt;/</span><span style="color: #800000;">span</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">秒</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">br</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />宽度:</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">span&nbsp;</span><span style="color: #ff0000;">id</span><span style="color: #0000ff;">="spnCurrentMediaWidth"</span><span style="color: #0000ff;">&gt;&lt;/</span><span style="color: #800000;">span</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">像素</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">br</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />高度:</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">span&nbsp;</span><span style="color: #ff0000;">id</span><span style="color: #0000ff;">="spnCurrentMediaHeight"</span><span style="color: #0000ff;">&gt;&lt;/</span><span style="color: #800000;">span</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">像素</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">br</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />标志数:</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">span&nbsp;</span><span style="color: #ff0000;">id</span><span style="color: #0000ff;">="spnCurrentMediaMarkerCount"</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;">br</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />源地址:</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">span&nbsp;</span><span style="color: #ff0000;">id</span><span style="color: #0000ff;">="spnCurrentSourceURL"</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;">br</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">br</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">br</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">INPUT&nbsp;</span><span style="color: #ff0000;">TYPE&nbsp;</span><span style="color: #0000ff;">=&nbsp;"BUTTON"</span><span style="color: #ff0000;">&nbsp;ID&nbsp;</span><span style="color: #0000ff;">=&nbsp;"play"</span><span style="color: #ff0000;">&nbsp;Name</span><span style="color: #0000ff;">="play"</span><span style="color: #ff0000;">&nbsp;VALUE&nbsp;</span><span style="color: #0000ff;">=&nbsp;"播放选中的歌曲"</span><span style="color: #ff0000;">&nbsp;onClick&nbsp;</span><span style="color: #0000ff;">=&nbsp;"addSeletedSongToPlayList();"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">INPUT&nbsp;</span><span style="color: #ff0000;">TYPE&nbsp;</span><span style="color: #0000ff;">=&nbsp;"BUTTON"</span><span style="color: #ff0000;">&nbsp;ID&nbsp;</span><span style="color: #0000ff;">=&nbsp;"clear"</span><span style="color: #ff0000;">&nbsp;Name</span><span style="color: #0000ff;">="clear"</span><span style="color: #ff0000;">&nbsp;VALUE&nbsp;</span><span style="color: #0000ff;">=&nbsp;"清空播放列表"</span><span style="color: #ff0000;">&nbsp;onClick&nbsp;</span><span style="color: #0000ff;">=&nbsp;"clearPlaylist();"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">INPUT&nbsp;</span><span style="color: #ff0000;">TYPE&nbsp;</span><span style="color: #0000ff;">=&nbsp;"BUTTON"</span><span style="color: #ff0000;">&nbsp;ID&nbsp;</span><span style="color: #0000ff;">=&nbsp;"clear"</span><span style="color: #ff0000;">&nbsp;Name</span><span style="color: #0000ff;">="clear"</span><span style="color: #ff0000;">&nbsp;VALUE&nbsp;</span><span style="color: #0000ff;">=&nbsp;"清空媒体列表"</span><span style="color: #ff0000;">&nbsp;onClick&nbsp;</span><span style="color: #0000ff;">=&nbsp;"clearMedialist();"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">br</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">input&nbsp;</span><span style="color: #ff0000;">type</span><span style="color: #0000ff;">="Text"</span><span style="color: #ff0000;">&nbsp;name</span><span style="color: #0000ff;">="songURL"</span><span style="color: #ff0000;">&nbsp;value&nbsp;</span><span style="color: #0000ff;">="http://"</span><span style="color: #ff0000;">&nbsp;size</span><span style="color: #0000ff;">="33"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">INPUT&nbsp;</span><span style="color: #ff0000;">TYPE&nbsp;</span><span style="color: #0000ff;">=&nbsp;"BUTTON"</span><span style="color: #ff0000;">&nbsp;ID&nbsp;</span><span style="color: #0000ff;">=&nbsp;"add"</span><span style="color: #ff0000;">&nbsp;Name</span><span style="color: #0000ff;">="add"</span><span style="color: #ff0000;">&nbsp;VALUE&nbsp;</span><span style="color: #0000ff;">=&nbsp;"添加到媒体列表"</span><span style="color: #ff0000;">&nbsp;onClick&nbsp;</span><span style="color: #0000ff;">=&nbsp;"addUrlToList();"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">br</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">可输入:1)HTTP地址:&nbsp;如http://www.aaa.com/xxx.mp3<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">br</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">2).相对位置:&nbsp;如yyy.wmv<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">br</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">3).绝对位置:&nbsp;如file:///D:/bbb/zzz.wma<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">br</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">br</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">input&nbsp;</span><span style="color: #ff0000;">type</span><span style="color: #0000ff;">="button"</span><span style="color: #ff0000;">&nbsp;onclick</span><span style="color: #0000ff;">="alert(Player.versionInfo);"</span><span style="color: #ff0000;">&nbsp;value</span><span style="color: #0000ff;">="播放器版本"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">input&nbsp;</span><span style="color: #ff0000;">type</span><span style="color: #0000ff;">="button"</span><span style="color: #ff0000;">&nbsp;onclick</span><span style="color: #0000ff;">="alert(Player.controls.currentPosition);"</span><span style="color: #ff0000;">&nbsp;value</span><span style="color: #0000ff;">="获取当前位置"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />跳到</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">input&nbsp;</span><span style="color: #ff0000;">type</span><span style="color: #0000ff;">="text"</span><span style="color: #ff0000;">&nbsp;id</span><span style="color: #0000ff;">="txtPosition"</span><span style="color: #ff0000;">&nbsp;size</span><span style="color: #0000ff;">="5"</span><span style="color: #ff0000;">&nbsp;value</span><span style="color: #0000ff;">="1.0"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">秒播放<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">input&nbsp;</span><span style="color: #ff0000;">type</span><span style="color: #0000ff;">="button"</span><span style="color: #ff0000;">&nbsp;onclick</span><span style="color: #0000ff;">="playposition();"</span><span style="color: #ff0000;">&nbsp;value</span><span style="color: #0000ff;">="确定"</span><span style="color: #0000ff;">&gt;</span></div>
</div>
<br />
注意：该代码仅能在<font size="4"><span style="color: #ff0000;">IE</span></font>下运行，系统必须安装<font style="color: #993300;" size="4">Windows Media Player<br />
</font>源代码:<a target="_blank" title="点击下载" href="http://www.cnblogs.com/Files/redleaf1995/testwmp.rar">http://www.cnblogs.com/Files/redleaf1995/testwmp.rar</a>
<img src="http://www.cnblogs.com/redleaf1995/aggbug/1163896.html?type=1" width="1" height="1" alt=""/><p>评论: 1　<a href="http://www.cnblogs.com/redleaf1995/archive/2008/04/21/1163896.html#pagedcomment" target="_blank">查看评论</a>　<a href="http://www.cnblogs.com/redleaf1995/archive/2008/04/21/1163896.html#commentform" target="_blank">发表评论</a></p><hr/><p>最新新闻：<br/>· <a href="http://news.cnblogs.com/n/56857/" target="_blank">Facebook与美国在线合作 整合AIM动态功能</a><span style="color:gray">(2010-02-10 16:41)</span><br/>· <a href="http://news.cnblogs.com/n/56855/" target="_blank">NDepend 3.0已与Visual Studio集成</a><span style="color:gray">(2010-02-10 16:17)</span><br/>· <a href="http://news.cnblogs.com/n/56854/" target="_blank">Ruby in Steel 1.5发布，去除IronRuby支持</a><span style="color:gray">(2010-02-10 16:14)</span><br/>· <a href="http://news.cnblogs.com/n/56852/" target="_blank">淘宝网通过索引模式涉足网络文学</a><span style="color:gray">(2010-02-10 15:59)</span><br/>· <a href="http://news.cnblogs.com/n/56851/" target="_blank">苹果发布 iPhone/iPad SDK 3.2 beta2 开发包</a><span style="color:gray">(2010-02-10 15:37)</span><br/></p><p>编辑推荐：<a href="http://news.cnblogs.com/news/tag/Buzz/" target="_blank">Google Buzz相关新闻</a><br/></p><p>网站导航：<a href="http://www.cnblogs.com" target="_blank">博客园首页</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/" target="_blank">个人主页</a>&nbsp;&nbsp;<a href="http://news.cnblogs.com" target="_blank">新闻</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/ing/" target="_blank">闪存</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/group/" target="_blank">小组</a>&nbsp;&nbsp;<a href="http://space.cnblogs.com/q/" target="_blank">博问</a>&nbsp;&nbsp;<a href="http://space.cnblogs.com" target="_blank">社区</a>&nbsp;&nbsp;<a href="http://kb.cnblogs.com" target="_blank">知识库</a></p>]]></description></item><item><title>setCapture和releaseCapture的小应用</title><link>http://www.cnblogs.com/redleaf1995/archive/2008/04/18/1159572.html</link><dc:creator>红色枫叶</dc:creator><author>红色枫叶</author><pubDate>Fri, 18 Apr 2008 03:25:00 GMT</pubDate><guid>http://www.cnblogs.com/redleaf1995/archive/2008/04/18/1159572.html</guid><description><![CDATA[<p>阅读: 1324 评论: 0 作者: <a href="http://www.cnblogs.com/redleaf1995/" target="_blank">红色枫叶</a> 发表于 2008-04-18 11:25 <a href="http://www.cnblogs.com/redleaf1995/archive/2008/04/18/1159572.html" target="_blank">原文链接</a></p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
web开发和windows开发最大的区别就是windows开发是有状态的,而web开发是无状态的,在windows中,一切操作都可以由程序来控制
,除非强制执行ctrl+alt+del;但web操作就不一样了,即使执行很重要的操作,用户一点击浏览器关闭按钮,就将前面操作成果化为乌有.尽管可
以在onunload事件中加些代码,让用户可以选择是否退出,但不能从根本上解决问题!<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
前几天,从网上看到setCapture方法,了解了一下,大体是这样的意思,当在IE文档某个区域中使用了这个方法,并且写了onclick或者
onmouse***等有关的鼠标事件方法,那么它就会监视相应的鼠标操作,即使你的鼠标移出了IE,它也一样能捕获到.如果你在某div中的
onclick事件中写了一个alert命令,这时,你点击的关闭按钮,它也一样会弹出alert窗口.releaseCapture与
setCapture方法相反,释放鼠标监控.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  利用这个特性,我们可以延缓IE的关闭窗口等破坏性操作,将一些重要的操作能够在破坏性操作执行之前得到处理.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
有一点遗憾:setCapture和releaseCapture 不支持键盘事件.只对onmousedown, onmouseup,
onmousemove, onclick, ondblclick, onmouseover, onmouseout这样的鼠标事件起作用.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  下面是一个小例子,若我们要对divMain这个div元素里面的内容进行保护: <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1). 对divMain执行setCapture方法: <br />
document.getElementById("divMain").setCapture();<br />
2).加入一按钮btnChange,可以进行setCapture和releaseCapture切换,定义一全局变量;<br />
var isFreeze = true; <br />
3).在btnChange的onclick事件中,加入下列代码:<br />
<div style="border: 0.5pt solid windowtext; padding: 4px 5.4pt; background: #e6e6e6 none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 95%;">
<div><img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /><span style="color: #0000ff;">function</span><span style="color: #000000;">&nbsp;change_capture(obj)<br />
<img onclick="this.style.display='none'; document.getElementById('_29_291_Open_Text').style.display='none'; document.getElementById('_29_291_Closed_Image').style.display='inline'; document.getElementById('_29_291_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" id="_29_291_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_29_291_Closed_Text').style.display='none'; document.getElementById('_29_291_Open_Image').style.display='inline'; document.getElementById('_29_291_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" id="_29_291_Closed_Image" alt="" align="top" /></span><span id="_29_291_Open_Text"><span style="color: #000000;">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;isFreeze&nbsp;</span><span style="color: #000000;">=</span>&nbsp;<span style="color: #000000;">!</span><span style="color: #000000;">isFreeze;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">if</span><span style="color: #000000;">(isFreeze)<br />
<img onclick="this.style.display='none'; document.getElementById('_76_162_Open_Text').style.display='none'; document.getElementById('_76_162_Closed_Image').style.display='inline'; document.getElementById('_76_162_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_76_162_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_76_162_Closed_Text').style.display='none'; document.getElementById('_76_162_Open_Image').style.display='inline'; document.getElementById('_76_162_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_76_162_Closed_Image" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_76_162_Open_Text"><span style="color: #000000;">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;obj.value&nbsp;</span><span style="color: #000000;">=</span>&nbsp;<span style="color: #000000;">"</span><span style="color: #000000;">releaseCapture</span><span style="color: #000000;">"</span><span style="color: #000000;">;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;document.getElementById(</span><span style="color: #000000;">"</span><span style="color: #000000;">divMain</span><span style="color: #000000;">"</span><span style="color: #000000;">).setCapture();<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">else</span><span style="color: #000000;"><br />
<img onclick="this.style.display='none'; document.getElementById('_171_289_Open_Text').style.display='none'; document.getElementById('_171_289_Closed_Image').style.display='inline'; document.getElementById('_171_289_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_171_289_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_171_289_Closed_Text').style.display='none'; document.getElementById('_171_289_Open_Image').style.display='inline'; document.getElementById('_171_289_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_171_289_Closed_Image" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_171_289_Open_Text"><span style="color: #000000;">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;obj.value&nbsp;</span><span style="color: #000000;">=</span>&nbsp;<span style="color: #000000;">"</span><span style="color: #000000;">setCapture</span><span style="color: #000000;">"</span><span style="color: #000000;">;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alert(</span><span style="color: #000000;">'</span><span style="color: #000000;">保存！</span><span style="color: #000000;">'</span><span style="color: #000000;">);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #008000;">//</span><span style="color: #008000;">可以执行重要操作</span><span style="color: #008000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /></span><span style="color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;document.getElementById(</span><span style="color: #000000;">"</span><span style="color: #000000;">divMain</span><span style="color: #000000;">"</span><span style="color: #000000;">).releaseCapture();<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" alt="" align="top" />}</span></span></div>
</div>
4).divMain的onclick事件中,加入下列代码:<br />
<div style="border: 0.5pt solid windowtext; padding: 4px 5.4pt; background: #e6e6e6 none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 95%;">
<div><img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /><span style="color: #0000ff;">function</span><span style="color: #000000;">&nbsp;click_func()<br />
<img onclick="this.style.display='none'; document.getElementById('_22_320_Open_Text').style.display='none'; document.getElementById('_22_320_Closed_Image').style.display='inline'; document.getElementById('_22_320_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" id="_22_320_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_22_320_Closed_Text').style.display='none'; document.getElementById('_22_320_Open_Image').style.display='inline'; document.getElementById('_22_320_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" id="_22_320_Closed_Image" alt="" align="top" /></span><span id="_22_320_Open_Text"><span style="color: #000000;">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">if</span><span style="color: #000000;">(event.srcElement.id&nbsp;</span><span style="color: #000000;">==</span>&nbsp;<span style="color: #000000;">"</span><span style="color: #000000;">divMain</span><span style="color: #000000;">"</span><span style="color: #000000;">)<br />
<img onclick="this.style.display='none'; document.getElementById('_63_157_Open_Text').style.display='none'; document.getElementById('_63_157_Closed_Image').style.display='inline'; document.getElementById('_63_157_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_63_157_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_63_157_Closed_Text').style.display='none'; document.getElementById('_63_157_Open_Image').style.display='inline'; document.getElementById('_63_157_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_63_157_Closed_Image" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_63_157_Open_Text"><span style="color: #000000;">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alert(</span><span style="color: #000000;">"</span><span style="color: #000000;">处理中...</span><span style="color: #000000;">"</span><span style="color: #000000;">);&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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #008000;">//</span><span style="color: #008000;">常规操作</span><span style="color: #008000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /></span><span style="color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;document.getElementById(</span><span style="color: #000000;">"</span><span style="color: #000000;">divMain</span><span style="color: #000000;">"</span><span style="color: #000000;">).setCapture();<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">else</span><span style="color: #000000;"><br />
<img onclick="this.style.display='none'; document.getElementById('_166_318_Open_Text').style.display='none'; document.getElementById('_166_318_Closed_Image').style.display='inline'; document.getElementById('_166_318_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_166_318_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_166_318_Closed_Text').style.display='none'; document.getElementById('_166_318_Open_Image').style.display='inline'; document.getElementById('_166_318_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_166_318_Closed_Image" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_166_318_Open_Text"><span style="color: #000000;">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">if</span><span style="color: #000000;">(isFreeze&nbsp;</span><span style="color: #000000;">&amp;&amp;</span><span style="color: #000000;">&nbsp;event.srcElement.id&nbsp;</span><span style="color: #000000;">!=</span>&nbsp;<span style="color: #000000;">"</span><span style="color: #000000;">btnChange</span><span style="color: #000000;">"</span><span style="color: #000000;">)<br />
<img onclick="this.style.display='none'; document.getElementById('_223_315_Open_Text').style.display='none'; document.getElementById('_223_315_Closed_Image').style.display='inline'; document.getElementById('_223_315_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_223_315_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_223_315_Closed_Text').style.display='none'; document.getElementById('_223_315_Open_Image').style.display='inline'; document.getElementById('_223_315_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_223_315_Closed_Image" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_223_315_Open_Text"><span style="color: #000000;">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alert(</span><span style="color: #000000;">'</span><span style="color: #000000;">未执行releaseCapture,不能点击</span><span style="color: #000000;">'</span><span style="color: #000000;">);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;document.getElementById(</span><span style="color: #000000;">"</span><span style="color: #000000;">divMain</span><span style="color: #000000;">"</span><span style="color: #000000;">).setCapture();<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" alt="" align="top" />}</span></span></div>
</div>
5).对ALT+F4进行处理,在body的onkeydown事件中加入下列代码:<br />
<div style="border: 0.5pt solid windowtext; padding: 4px 5.4pt; background: #e6e6e6 none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 95%;">
<div><img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /><span style="color: #0000ff;">function</span><span style="color: #000000;">&nbsp;keydown_func()<br />
<img onclick="this.style.display='none'; document.getElementById('_24_350_Open_Text').style.display='none'; document.getElementById('_24_350_Closed_Image').style.display='inline'; document.getElementById('_24_350_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" id="_24_350_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_24_350_Closed_Text').style.display='none'; document.getElementById('_24_350_Open_Image').style.display='inline'; document.getElementById('_24_350_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" id="_24_350_Closed_Image" alt="" align="top" /></span><span id="_24_350_Open_Text"><span style="color: #000000;">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">if</span><span style="color: #000000;">&nbsp;(event.keyCode</span><span style="color: #000000;">==</span><span style="color: #000000;">115</span><span style="color: #000000;">&nbsp;&nbsp;</span><span style="color: #000000;">&amp;&amp;</span><span style="color: #000000;">&nbsp;event.altKey)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #008000;">//</span><span style="color: #008000;">ALT+F4</span><span style="color: #008000;"><br />
<img onclick="this.style.display='none'; document.getElementById('_80_291_Open_Text').style.display='none'; document.getElementById('_80_291_Closed_Image').style.display='inline'; document.getElementById('_80_291_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_80_291_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_80_291_Closed_Text').style.display='none'; document.getElementById('_80_291_Open_Image').style.display='inline'; document.getElementById('_80_291_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_80_291_Closed_Image" alt="" align="top" /></span><span style="color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_80_291_Open_Text"><span style="color: #000000;">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">if</span><span style="color: #000000;">(isFreeze)<br />
<img onclick="this.style.display='none'; document.getElementById('_99_154_Open_Text').style.display='none'; document.getElementById('_99_154_Closed_Image').style.display='inline'; document.getElementById('_99_154_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_99_154_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_99_154_Closed_Text').style.display='none'; document.getElementById('_99_154_Open_Image').style.display='inline'; document.getElementById('_99_154_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_99_154_Closed_Image" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_99_154_Open_Text"><span style="color: #000000;">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alert(</span><span style="color: #000000;">'</span><span style="color: #000000;">保存！</span><span style="color: #000000;">'</span><span style="color: #000000;">);&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;</span><span style="color: #008000;">//</span><span style="color: #008000;">可以执行重要操作</span><span style="color: #008000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" /></span><span style="color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #008000;">//</span><span style="color: #008000;">window.showModelessDialog("about:blank","","dialogWidth:1px;dialogheight:1px");&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #008000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /></span><span style="color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #008000;">//</span><span style="color: #008000;">return&nbsp;false;</span><span style="color: #008000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" /></span><span style="color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;document.getElementById(</span><span style="color: #000000;">"</span><span style="color: #000000;">divMain</span><span style="color: #000000;">"</span><span style="color: #000000;">).setCapture();<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" alt="" align="top" />}</span></span></div>
</div>
完整代码如下:<br />
<div style="border: 0.5pt solid windowtext; padding: 4px 5.4pt; background: #e6e6e6 none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 95%;">
<div><img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">HTML</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">head</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">title</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">setCapture和releaseCapture的小应用</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">title</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img onclick="this.style.display='none'; document.getElementById('_95_1243_Open_Text').style.display='none'; document.getElementById('_95_1243_Closed_Image').style.display='inline'; document.getElementById('_95_1243_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" id="_95_1243_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_95_1243_Closed_Text').style.display='none'; document.getElementById('_95_1243_Open_Image').style.display='inline'; document.getElementById('_95_1243_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" id="_95_1243_Closed_Image" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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="_95_1243_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">&lt;!--</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;isFreeze&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span>&nbsp;<span style="background-color: #f5f5f5; color: #0000ff;">true</span><span style="background-color: #f5f5f5; color: #000000;">;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">function</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;click_func()<br />
<img onclick="this.style.display='none'; document.getElementById('_166_506_Open_Text').style.display='none'; document.getElementById('_166_506_Closed_Image').style.display='inline'; document.getElementById('_166_506_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_166_506_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_166_506_Closed_Text').style.display='none'; document.getElementById('_166_506_Open_Image').style.display='inline'; document.getElementById('_166_506_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_166_506_Closed_Image" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_166_506_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">if</span><span style="background-color: #f5f5f5; color: #000000;">(event.srcElement.id&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">==</span>&nbsp;<span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">divMain</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">)<br />
<img onclick="this.style.display='none'; document.getElementById('_213_316_Open_Text').style.display='none'; document.getElementById('_213_316_Closed_Image').style.display='inline'; document.getElementById('_213_316_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_213_316_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_213_316_Closed_Text').style.display='none'; document.getElementById('_213_316_Open_Image').style.display='inline'; document.getElementById('_213_316_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_213_316_Closed_Image" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_213_316_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alert(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">处理中...</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">);&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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #008000;">//</span><span style="background-color: #f5f5f5; color: #008000;">常规操作</span><span style="background-color: #f5f5f5; color: #008000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;document.getElementById(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">divMain</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">).setCapture();<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">else</span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img onclick="this.style.display='none'; document.getElementById('_331_501_Open_Text').style.display='none'; document.getElementById('_331_501_Closed_Image').style.display='inline'; document.getElementById('_331_501_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_331_501_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_331_501_Closed_Text').style.display='none'; document.getElementById('_331_501_Open_Image').style.display='inline'; document.getElementById('_331_501_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_331_501_Closed_Image" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_331_501_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">if</span><span style="background-color: #f5f5f5; color: #000000;">(isFreeze&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">&amp;&amp;</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;event.srcElement.id&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">!=</span>&nbsp;<span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">btnChange</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">)<br />
<img onclick="this.style.display='none'; document.getElementById('_394_495_Open_Text').style.display='none'; document.getElementById('_394_495_Closed_Image').style.display='inline'; document.getElementById('_394_495_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_394_495_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_394_495_Closed_Text').style.display='none'; document.getElementById('_394_495_Open_Image').style.display='inline'; document.getElementById('_394_495_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_394_495_Closed_Image" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_394_495_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" 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;alert(</span><span style="background-color: #f5f5f5; color: #000000;">'</span><span style="background-color: #f5f5f5; color: #000000;">未执行releaseCapture,不能点击</span><span style="background-color: #f5f5f5; color: #000000;">'</span><span style="background-color: #f5f5f5; color: #000000;">);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" 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;document.getElementById(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">divMain</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">).setCapture();<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">function</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;keydown_func()<br />
<img onclick="this.style.display='none'; document.getElementById('_542_893_Open_Text').style.display='none'; document.getElementById('_542_893_Closed_Image').style.display='inline'; document.getElementById('_542_893_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_542_893_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_542_893_Closed_Text').style.display='none'; document.getElementById('_542_893_Open_Image').style.display='inline'; document.getElementById('_542_893_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_542_893_Closed_Image" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_542_893_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">if</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;(event.keyCode</span><span style="background-color: #f5f5f5; color: #000000;">==</span><span style="background-color: #f5f5f5; color: #000000;">115</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">&amp;&amp;</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;event.altKey)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #008000;">//</span><span style="background-color: #f5f5f5; color: #008000;">ALT+F4</span><span style="background-color: #f5f5f5; color: #008000;"><br />
<img onclick="this.style.display='none'; document.getElementById('_609_831_Open_Text').style.display='none'; document.getElementById('_609_831_Closed_Image').style.display='inline'; document.getElementById('_609_831_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_609_831_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_609_831_Closed_Text').style.display='none'; document.getElementById('_609_831_Open_Image').style.display='inline'; document.getElementById('_609_831_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_609_831_Closed_Image" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_609_831_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">if</span><span style="background-color: #f5f5f5; color: #000000;">(isFreeze)<br />
<img onclick="this.style.display='none'; document.getElementById('_634_689_Open_Text').style.display='none'; document.getElementById('_634_689_Closed_Image').style.display='inline'; document.getElementById('_634_689_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_634_689_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_634_689_Closed_Text').style.display='none'; document.getElementById('_634_689_Open_Image').style.display='inline'; document.getElementById('_634_689_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_634_689_Closed_Image" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_634_689_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alert(</span><span style="background-color: #f5f5f5; color: #000000;">'</span><span style="background-color: #f5f5f5; color: #000000;">保存！</span><span style="background-color: #f5f5f5; color: #000000;">'</span><span style="background-color: #f5f5f5; color: #000000;">);&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;</span><span style="background-color: #f5f5f5; color: #008000;">//</span><span style="background-color: #f5f5f5; color: #008000;">可以执行重要操作</span><span style="background-color: #f5f5f5; color: #008000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #008000;">//</span><span style="background-color: #f5f5f5; color: #008000;">window.showModelessDialog("about:blank","","dialogWidth:1px;dialogheight:1px");</span><span style="background-color: #f5f5f5; color: #008000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #008000;">//</span><span style="background-color: #f5f5f5; color: #008000;">return&nbsp;false;</span><span style="background-color: #f5f5f5; color: #008000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;document.getElementById(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">divMain</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">).setCapture();<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">function</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;change_capture(obj)<br />
<img onclick="this.style.display='none'; document.getElementById('_934_1231_Open_Text').style.display='none'; document.getElementById('_934_1231_Closed_Image').style.display='inline'; document.getElementById('_934_1231_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_934_1231_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_934_1231_Closed_Text').style.display='none'; document.getElementById('_934_1231_Open_Image').style.display='inline'; document.getElementById('_934_1231_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_934_1231_Closed_Image" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_934_1231_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;isFreeze&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span>&nbsp;<span style="background-color: #f5f5f5; color: #000000;">!</span><span style="background-color: #f5f5f5; color: #000000;">isFreeze;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">if</span><span style="background-color: #f5f5f5; color: #000000;">(isFreeze)<br />
<img onclick="this.style.display='none'; document.getElementById('_983_1078_Open_Text').style.display='none'; document.getElementById('_983_1078_Closed_Image').style.display='inline'; document.getElementById('_983_1078_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_983_1078_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_983_1078_Closed_Text').style.display='none'; document.getElementById('_983_1078_Open_Image').style.display='inline'; document.getElementById('_983_1078_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_983_1078_Closed_Image" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_983_1078_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;obj.value&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span>&nbsp;<span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">releaseCapture</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;document.getElementById(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">divMain</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">).setCapture();<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">else</span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img onclick="this.style.display='none'; document.getElementById('_1093_1226_Open_Text').style.display='none'; document.getElementById('_1093_1226_Closed_Image').style.display='inline'; document.getElementById('_1093_1226_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_1093_1226_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_1093_1226_Closed_Text').style.display='none'; document.getElementById('_1093_1226_Open_Image').style.display='inline'; document.getElementById('_1093_1226_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_1093_1226_Closed_Image" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_1093_1226_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;obj.value&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span>&nbsp;<span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">setCapture</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alert(</span><span style="background-color: #f5f5f5; color: #000000;">'</span><span style="background-color: #f5f5f5; color: #000000;">保存！</span><span style="background-color: #f5f5f5; color: #000000;">'</span><span style="background-color: #f5f5f5; color: #000000;">);&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;</span><span style="background-color: #f5f5f5; color: #008000;">//</span><span style="background-color: #f5f5f5; color: #008000;">可以执行重要操作</span><span style="background-color: #f5f5f5; color: #008000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;document.getElementById(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">divMain</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">).releaseCapture();<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #008000;">//</span><span style="background-color: #f5f5f5; color: #008000;">--&gt;&nbsp;</span><span style="background-color: #f5f5f5; color: #008000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">SCRIPT</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">head</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">BODY&nbsp;&nbsp;</span><span style="color: #ff0000;">onkeydown</span><span style="color: #0000ff;">="keydown_func();"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">div&nbsp;</span><span style="color: #ff0000;">id</span><span style="color: #0000ff;">="divMain"</span><span style="color: #ff0000;">&nbsp;style</span><span style="color: #0000ff;">="width:500px;height:400px;border:1px&nbsp;solid&nbsp;#999;padding:2px"</span><span style="color: #ff0000;">&nbsp;onclick</span><span style="color: #0000ff;">="click_func();"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;点一下IE的菜单或者按钮看看:)&nbsp;又或者IE窗口外的地方<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">input&nbsp;</span><span style="color: #ff0000;">type</span><span style="color: #0000ff;">="button"</span><span style="color: #ff0000;">&nbsp;value</span><span style="color: #0000ff;">="releaseCapture"</span><span style="color: #ff0000;">&nbsp;onclick</span><span style="color: #0000ff;">="change_capture(this);"</span><span style="color: #ff0000;">&nbsp;id</span><span style="color: #0000ff;">="btnChange"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img onclick="this.style.display='none'; document.getElementById('_1574_1630_Open_Text').style.display='none'; document.getElementById('_1574_1630_Closed_Image').style.display='inline'; document.getElementById('_1574_1630_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" id="_1574_1630_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_1574_1630_Closed_Text').style.display='none'; document.getElementById('_1574_1630_Open_Image').style.display='inline'; document.getElementById('_1574_1630_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" id="_1574_1630_Closed_Image" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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="_1574_1630_Open_Text"><span style="background-color: #f5f5f5; color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;document.getElementById(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">divMain</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">).setCapture();<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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 />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">div</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">BODY</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">HTML</span><span style="color: #0000ff;">&gt;</span></div>
</div>
<span style="color: #ff0000; font-weight: bold;">注意</span>:该实例仅能应用于<font size="4"><span style="color: #ff00ff; font-weight: bold;">IE</span></font><br />
<span style="font-family: 宋体;">源代码</span>: <a title="点击下载" target="_blank" href="http://www.cnblogs.com/Files/redleaf1995/capture.rar">http://www.cnblogs.com/Files/redleaf1995/capture.rar</a>
<img src="http://www.cnblogs.com/redleaf1995/aggbug/1159572.html?type=1" width="1" height="1" alt=""/><p>评论: 0　<a href="http://www.cnblogs.com/redleaf1995/archive/2008/04/18/1159572.html#pagedcomment" target="_blank">查看评论</a>　<a href="http://www.cnblogs.com/redleaf1995/archive/2008/04/18/1159572.html#commentform" target="_blank">发表评论</a></p><hr/><p>最新新闻：<br/>· <a href="http://news.cnblogs.com/n/56857/" target="_blank">Facebook与美国在线合作 整合AIM动态功能</a><span style="color:gray">(2010-02-10 16:41)</span><br/>· <a href="http://news.cnblogs.com/n/56855/" target="_blank">NDepend 3.0已与Visual Studio集成</a><span style="color:gray">(2010-02-10 16:17)</span><br/>· <a href="http://news.cnblogs.com/n/56854/" target="_blank">Ruby in Steel 1.5发布，去除IronRuby支持</a><span style="color:gray">(2010-02-10 16:14)</span><br/>· <a href="http://news.cnblogs.com/n/56852/" target="_blank">淘宝网通过索引模式涉足网络文学</a><span style="color:gray">(2010-02-10 15:59)</span><br/>· <a href="http://news.cnblogs.com/n/56851/" target="_blank">苹果发布 iPhone/iPad SDK 3.2 beta2 开发包</a><span style="color:gray">(2010-02-10 15:37)</span><br/></p><p>编辑推荐：<a href="http://news.cnblogs.com/news/tag/Buzz/" target="_blank">Google Buzz相关新闻</a><br/></p><p>网站导航：<a href="http://www.cnblogs.com" target="_blank">博客园首页</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/" target="_blank">个人主页</a>&nbsp;&nbsp;<a href="http://news.cnblogs.com" target="_blank">新闻</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/ing/" target="_blank">闪存</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/group/" target="_blank">小组</a>&nbsp;&nbsp;<a href="http://space.cnblogs.com/q/" target="_blank">博问</a>&nbsp;&nbsp;<a href="http://space.cnblogs.com" target="_blank">社区</a>&nbsp;&nbsp;<a href="http://kb.cnblogs.com" target="_blank">知识库</a></p>]]></description></item><item><title>用javascript定义和操作自定义HTML元素</title><link>http://www.cnblogs.com/redleaf1995/archive/2008/04/17/1157709.html</link><dc:creator>红色枫叶</dc:creator><author>红色枫叶</author><pubDate>Thu, 17 Apr 2008 03:28:00 GMT</pubDate><guid>http://www.cnblogs.com/redleaf1995/archive/2008/04/17/1157709.html</guid><description><![CDATA[<p>阅读: 391 评论: 3 作者: <a href="http://www.cnblogs.com/redleaf1995/" target="_blank">红色枫叶</a> 发表于 2008-04-17 11:28 <a href="http://www.cnblogs.com/redleaf1995/archive/2008/04/17/1157709.html" target="_blank">原文链接</a></p><p><span style="font-family: 宋体;">前面的文章探讨了使用</span>javascript<span style="font-family: 宋体;">来操纵</span>HTML<span style="font-family: 宋体;">元素的自定义属性，那么在</span>HTML<span style="font-family: 宋体;">页面中，除了系统支持的</span>HTML<span style="font-family: 宋体;">元素外，是否可以建立自定义的</span>HTML<span style="font-family: 宋体;">元素呢？答案是可以的。</span></p>
<p><span style="font-family: 宋体;">自定义的</span>HTML<span style="font-family: 宋体;">元素与系统自身的</span>HTML<span style="font-family: 宋体;">元素地位相同，都可以用</span>document.getElementById<span style="font-family: 宋体;">来获得，区别在于，自定义的</span>HTML<span style="font-family: 宋体;">元素都是不可见的，类似于隐藏控件。</span></p>
<p><span style="font-family: 宋体;">使用自定义</span>HTML<span style="font-family: 宋体;">元素，我们就可以建立多种隐藏控件，而不一定拘泥于只能建立</span>input<span style="font-family: 宋体;">的</span>hidden<span style="font-family: 宋体;">元素了；另外，还可以用于某些特定方面的需求！</span></p>
<p><span style="font-family: 宋体;">如在</span>HTML<span style="font-family: 宋体;">页面中直接建立：</span></p>
<p style="margin-left: 18pt; text-indent: -18pt;" class="MsoNormal"><span style="font-family: 宋体;">象创建系统自带的</span>HTML<span style="font-family: 宋体;">元素那样添加：</span></p>
<div style="border: 0.5pt solid windowtext; padding: 4px 5.4pt; background: #e6e6e6 none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 95%;">
<div><img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /><span style="color: #0000ff;">var</span><span style="color: #000000;">&nbsp;cy&nbsp;</span><span style="color: #000000;">=</span><span style="color: #000000;">&nbsp;document.createElement(</span><span style="color: #000000;">"</span><span style="color: #000000;">YYY</span><span style="color: #000000;">"</span><span style="color: #000000;">);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />cy.id&nbsp;</span><span style="color: #000000;">=</span>&nbsp;<span style="color: #000000;">"</span><span style="color: #000000;">customControl_YYY</span><span style="color: #000000;">"</span><span style="color: #000000;">;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />cy.value&nbsp;</span><span style="color: #000000;">=</span>&nbsp;<span style="color: #000000;">"</span><span style="color: #000000;">自定义元素yyy</span><span style="color: #000000;">"</span><span style="color: #000000;">;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />cy.checked&nbsp;</span><span style="color: #000000;">=</span>&nbsp;<span style="color: #0000ff;">true</span><span style="color: #000000;">;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />document.body.appendChild(cy);</span></div>
</div>
<p>2<span style="font-family: 宋体;">）用</span>javascript<span style="font-family: 宋体;">来操作：</span></p>
alert(document.getElementById("customControl_YYY").value);<br />
alert(document.getElementById("customControl_YYY").checked);<br />
<p><span style="font-family: 宋体;">在这里，</span>Firefox<span style="font-family: 宋体;">支持直接取值，而不须用</span>attributes<span style="font-family: 宋体;">属性集合。</span></p>
<p><span style="font-family: 宋体;">代码如下：</span></p>
<div style="border: 0.5pt solid windowtext; padding: 4px 5.4pt; background: #e6e6e6 none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 95%;">
<div><img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" 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 />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">head</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">title</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">用javascript定义和操作自定义HTML元素</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">title</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img onclick="this.style.display='none'; document.getElementById('_90_678_Open_Text').style.display='none'; document.getElementById('_90_678_Closed_Image').style.display='inline'; document.getElementById('_90_678_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" id="_90_678_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_90_678_Closed_Text').style.display='none'; document.getElementById('_90_678_Open_Image').style.display='inline'; document.getElementById('_90_678_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" id="_90_678_Closed_Image" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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="_90_678_Open_Text"><span style="background-color: #f5f5f5; color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">function</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;getXXXValue()<br />
<img onclick="this.style.display='none'; document.getElementById('_120_314_Open_Text').style.display='none'; document.getElementById('_120_314_Closed_Image').style.display='inline'; document.getElementById('_120_314_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_120_314_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_120_314_Closed_Text').style.display='none'; document.getElementById('_120_314_Open_Image').style.display='inline'; document.getElementById('_120_314_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_120_314_Closed_Image" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_120_314_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #008000;">//</span><span style="background-color: #f5f5f5; color: #008000;">alert(document.getElementById("customControl_XXX").value);&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;&nbsp;&nbsp;//IE中可以使用</span><span style="background-color: #f5f5f5; color: #008000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alert(document.getElementById(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">customControl_XXX</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">).attributes[</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">value</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">].value);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #008000;">//</span><span style="background-color: #f5f5f5; color: #008000;">IE&nbsp;Firefox中均可使用</span><span style="background-color: #f5f5f5; color: #008000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #008000;">//</span><span style="background-color: #f5f5f5; color: #008000;">IE&nbsp;Firefox中均可使用</span><span style="background-color: #f5f5f5; color: #008000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /></span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">function</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;createYYYControl()<br />
<img onclick="this.style.display='none'; document.getElementById('_375_675_Open_Text').style.display='none'; document.getElementById('_375_675_Closed_Image').style.display='inline'; document.getElementById('_375_675_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_375_675_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_375_675_Closed_Text').style.display='none'; document.getElementById('_375_675_Open_Image').style.display='inline'; document.getElementById('_375_675_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_375_675_Closed_Image" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_375_675_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;cy&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;document.createElement(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">YYY</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cy.id&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span>&nbsp;<span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">customControl_YYY</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cy.value&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span>&nbsp;<span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">自定义元素yyy</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cy.checked&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span>&nbsp;<span style="background-color: #f5f5f5; color: #0000ff;">true</span><span style="background-color: #f5f5f5; color: #000000;">;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;document.body.appendChild(cy);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alert(document.getElementById(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">customControl_YYY</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">).value);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alert(document.getElementById(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">customControl_YYY</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">).checked);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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 />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">head</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">body</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">xxx&nbsp;</span><span style="color: #ff0000;">id</span><span style="color: #0000ff;">="customControl_XXX"</span><span style="color: #ff0000;">&nbsp;value</span><span style="color: #0000ff;">="自定义元素xxx"</span><span style="color: #0000ff;">&gt;&lt;/</span><span style="color: #800000;">xxx</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">input&nbsp;</span><span style="color: #ff0000;">type</span><span style="color: #0000ff;">="button"</span><span style="color: #ff0000;">&nbsp;value</span><span style="color: #0000ff;">="取得xxx元素的值"</span><span style="color: #ff0000;">&nbsp;onclick</span><span style="color: #0000ff;">="getXXXValue();"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">input&nbsp;</span><span style="color: #ff0000;">type</span><span style="color: #0000ff;">="button"</span><span style="color: #ff0000;">&nbsp;value</span><span style="color: #0000ff;">="生成yyy元素并取得该元素的值"</span><span style="color: #ff0000;">&nbsp;onclick</span><span style="color: #0000ff;">="createYYYControl();"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">body</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">html</span><span style="color: #0000ff;">&gt;</span></div>
</div>
<span style="font-family: 宋体;"><br />
源代码</span>:<a title="点击下载" target="_blank" href="http://www.cnblogs.com/Files/redleaf1995/CustomHtmlControl.rar">http://www.cnblogs.com/Files/redleaf1995/CustomHtmlControl.rar</a>
<img src="http://www.cnblogs.com/redleaf1995/aggbug/1157709.html?type=1" width="1" height="1" alt=""/><p>评论: 3　<a href="http://www.cnblogs.com/redleaf1995/archive/2008/04/17/1157709.html#pagedcomment" target="_blank">查看评论</a>　<a href="http://www.cnblogs.com/redleaf1995/archive/2008/04/17/1157709.html#commentform" target="_blank">发表评论</a></p><hr/><p>最新新闻：<br/>· <a href="http://news.cnblogs.com/n/56857/" target="_blank">Facebook与美国在线合作 整合AIM动态功能</a><span style="color:gray">(2010-02-10 16:41)</span><br/>· <a href="http://news.cnblogs.com/n/56855/" target="_blank">NDepend 3.0已与Visual Studio集成</a><span style="color:gray">(2010-02-10 16:17)</span><br/>· <a href="http://news.cnblogs.com/n/56854/" target="_blank">Ruby in Steel 1.5发布，去除IronRuby支持</a><span style="color:gray">(2010-02-10 16:14)</span><br/>· <a href="http://news.cnblogs.com/n/56852/" target="_blank">淘宝网通过索引模式涉足网络文学</a><span style="color:gray">(2010-02-10 15:59)</span><br/>· <a href="http://news.cnblogs.com/n/56851/" target="_blank">苹果发布 iPhone/iPad SDK 3.2 beta2 开发包</a><span style="color:gray">(2010-02-10 15:37)</span><br/></p><p>编辑推荐：<a href="http://news.cnblogs.com/news/tag/Buzz/" target="_blank">Google Buzz相关新闻</a><br/></p><p>网站导航：<a href="http://www.cnblogs.com" target="_blank">博客园首页</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/" target="_blank">个人主页</a>&nbsp;&nbsp;<a href="http://news.cnblogs.com" target="_blank">新闻</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/ing/" target="_blank">闪存</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/group/" target="_blank">小组</a>&nbsp;&nbsp;<a href="http://space.cnblogs.com/q/" target="_blank">博问</a>&nbsp;&nbsp;<a href="http://space.cnblogs.com" target="_blank">社区</a>&nbsp;&nbsp;<a href="http://kb.cnblogs.com" target="_blank">知识库</a></p>]]></description></item><item><title>纯javascript的HTML在线编辑器</title><link>http://www.cnblogs.com/redleaf1995/archive/2008/04/16/1155761.html</link><dc:creator>红色枫叶</dc:creator><author>红色枫叶</author><pubDate>Wed, 16 Apr 2008 03:35:00 GMT</pubDate><guid>http://www.cnblogs.com/redleaf1995/archive/2008/04/16/1155761.html</guid><description><![CDATA[<p>阅读: 1604 评论: 1 作者: <a href="http://www.cnblogs.com/redleaf1995/" target="_blank">红色枫叶</a> 发表于 2008-04-16 11:35 <a href="http://www.cnblogs.com/redleaf1995/archive/2008/04/16/1155761.html" target="_blank">原文链接</a></p><span style="font-family: 宋体;">因工作需要，需使用</span>javascript<span style="font-family: 宋体;">来操作</span>HTML<span style="font-family: 宋体;">在线编辑器，在网上搜了许多，都是与服务器端相结合的，通过表单提交的方式来处理的。没办法，只好在此基础上对其进行更新！</span>&nbsp;  <br />
<span style="font-size: 10.5pt; font-family: 宋体;">参考的myeditor控件不知是哪位高人写的</span><span style="font-size: 10.5pt; font-family: 宋体;">。在此表示感谢</span><span style="font-family: 宋体;">！<br />
</span><span style="font-size: 10.5pt; font-family: 宋体;">首先，定义一全局变量，用于向</span><span style="font-size: 10.5pt; font-family: &quot;Times New Roman&quot;;">HtmlEditor</span><span style="font-size: 10.5pt; font-family: 宋体;">传递值：<br />
<div style="border: 0.5pt solid windowtext; padding: 4px 5.4pt; background: rgb(230, 230, 230) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 95%;">
<div><img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">&nbsp;EDITOR_DEFAULT_VALUE&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span>&nbsp;<span style="color: rgb(0, 0, 0);">""</span><span style="color: rgb(0, 0, 0);">;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">全局变量,用于向Editor控件传递值</span></div>
</div>
</span>
<p><span style="font-family: 宋体;">原先控件的</span>editfunc.js<span style="font-family: 宋体;">中的代码注掉了很多，删除掉了作为</span>get<span style="font-family: 宋体;">方式传递的</span>TextArea<span style="font-family: 宋体;">对象。</span></p>
<span style="font-size: 10.5pt; font-family: &quot;Times New Roman&quot;;">editfunc.js</span><span style="font-size: 10.5pt; font-family: 宋体;">中设置初值的方法，作了改变：<br />
<div style="border: 0.5pt solid windowtext; padding: 4px 5.4pt; background: rgb(230, 230, 230) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 95%;">
<div><img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /><span style="color: rgb(0, 0, 255);">function</span><span style="color: rgb(0, 0, 0);">&nbsp;fSetHtmlContent()<br />
<img onclick="this.style.display='none'; document.getElementById('_27_428_Open_Text').style.display='none'; document.getElementById('_27_428_Closed_Image').style.display='inline'; document.getElementById('_27_428_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" id="_27_428_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_27_428_Closed_Text').style.display='none'; document.getElementById('_27_428_Open_Image').style.display='inline'; document.getElementById('_27_428_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" id="_27_428_Closed_Image" alt="" align="top" /></span><span id="_27_428_Open_Text"><span style="color: rgb(0, 0, 0);">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">&nbsp;ovalue&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;window.parent.EDITOR_DEFAULT_VALUE;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">&nbsp;html&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;ovalue;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">&nbsp;(html)<br />
<img onclick="this.style.display='none'; document.getElementById('_111_426_Open_Text').style.display='none'; document.getElementById('_111_426_Closed_Image').style.display='inline'; document.getElementById('_111_426_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_111_426_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_111_426_Closed_Text').style.display='none'; document.getElementById('_111_426_Open_Image').style.display='inline'; document.getElementById('_111_426_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_111_426_Closed_Image" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_111_426_Open_Text"><span style="color: rgb(0, 0, 0);">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">&nbsp;header&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span>&nbsp;<span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&lt;head&gt;&lt;link&nbsp;rel="stylesheet"&nbsp;type="text/css"&nbsp;href="editorArea.css"&nbsp;/&gt;&lt;/head&gt;&lt;body&nbsp;MONOSPACE&gt;</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">&nbsp;f&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;window.frames[</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">HtmlEditor</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">];<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;f.document.open();<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">f.document.getElementsByTagName("BODY")[0].innerHTML&nbsp;=&nbsp;oLinkField.value;</span><span style="color: rgb(0, 128, 0);"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" /></span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;f.document.write(header&nbsp;</span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);">&nbsp;html);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;f.document.close();<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" alt="" align="top" />}</span></span></div>
</div>
</span>
<p><span style="font-family: 宋体;">我是用的动态生成方式，通过点击按钮生成</span>HtmlEditor：</p>
<p>代码如下：</p>
<p><span>
<div style="border: 0.5pt solid windowtext; padding: 4px 5.4pt; background: rgb(230, 230, 230) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 95%;">
<div><img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">containername:存放iframe的容器名称&nbsp;framename:HtmlEditor的iframe名称&nbsp;editorpath:编辑器index.html的路径</span><span style="color: rgb(0, 128, 0);"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: rgb(0, 0, 255);">function</span><span style="color: rgb(0, 0, 0);">&nbsp;createEditor(containername,framename,editorpath)<br />
<img onclick="this.style.display='none'; document.getElementById('_146_562_Open_Text').style.display='none'; document.getElementById('_146_562_Closed_Image').style.display='inline'; document.getElementById('_146_562_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" id="_146_562_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_146_562_Closed_Text').style.display='none'; document.getElementById('_146_562_Open_Image').style.display='inline'; document.getElementById('_146_562_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" id="_146_562_Closed_Image" alt="" align="top" /></span><span id="_146_562_Open_Text"><span style="color: rgb(0, 0, 0);">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(0, 0, 0);">!</span><span style="color: rgb(0, 0, 0);">document.getElementById(framename))<br />
<img onclick="this.style.display='none'; document.getElementById('_190_560_Open_Text').style.display='none'; document.getElementById('_190_560_Closed_Image').style.display='inline'; document.getElementById('_190_560_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_190_560_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_190_560_Closed_Text').style.display='none'; document.getElementById('_190_560_Open_Image').style.display='inline'; document.getElementById('_190_560_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_190_560_Closed_Image" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_190_560_Open_Text"><span style="color: rgb(0, 0, 0);">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">&nbsp;HTMLEDITOR&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;document.createElement(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">iframe</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HTMLEDITOR.id&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;framename;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HTMLEDITOR.name&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;framename;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HTMLEDITOR.src&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;editorpath;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HTMLEDITOR.frameBorder&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span>&nbsp;<span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HTMLEDITOR.marginHeight&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span>&nbsp;<span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HTMLEDITOR.marginWidth&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span>&nbsp;<span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HTMLEDITOR.height&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span>&nbsp;<span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">238</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HTMLEDITOR.width&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span>&nbsp;<span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">400</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;document.getElementById(containername).appendChild(HTMLEDITOR);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" alt="" align="top" />}</span></span></div>
</div>
</span>  </p>
<p><span style="font-size: 9pt; font-family: 新宋体;">设置</span>HtmlEditor<span style="font-family: 宋体;">的值的代码：</span></p>
<div style="border: 0.5pt solid windowtext; padding: 4px 5.4pt; background: rgb(230, 230, 230) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 95%;">
<div><img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">设置HtmlEditor的文本&nbsp;framename:HtmlEditor的iframe名称&nbsp;html_text:带格式的文本</span><span style="color: rgb(0, 128, 0);"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: rgb(0, 0, 255);">function</span><span style="color: rgb(0, 0, 0);">&nbsp;setEditorText(framename,html_text)<br />
<img onclick="this.style.display='none'; document.getElementById('_109_364_Open_Text').style.display='none'; document.getElementById('_109_364_Closed_Image').style.display='inline'; document.getElementById('_109_364_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" id="_109_364_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_109_364_Closed_Text').style.display='none'; document.getElementById('_109_364_Open_Image').style.display='inline'; document.getElementById('_109_364_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" id="_109_364_Closed_Image" alt="" align="top" /></span><span id="_109_364_Open_Text"><span style="color: rgb(0, 0, 0);">{&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;HtmlEditor_Default_Value&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;html_text;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(window.frames[framename].frames[</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">HtmlEditor</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">]&nbsp;</span><span style="color: rgb(0, 0, 0);">!=</span>&nbsp;<span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">)<br />
<img onclick="this.style.display='none'; document.getElementById('_213_362_Open_Text').style.display='none'; document.getElementById('_213_362_Closed_Image').style.display='inline'; document.getElementById('_213_362_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_213_362_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_213_362_Closed_Text').style.display='none'; document.getElementById('_213_362_Open_Image').style.display='inline'; document.getElementById('_213_362_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_213_362_Closed_Image" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_213_362_Open_Text"><span style="color: rgb(0, 0, 0);">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">&nbsp;html&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;window.frames[framename].frames[</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">HtmlEditor</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">].document.getElementsByTagName(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">BODY</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">)[</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">];<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;html.innerHTML&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;HtmlEditor_Default_Value;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" alt="" align="top" />}</span></span></div>
</div>
<p><span style="font-size: 9pt; font-family: 新宋体;">获得</span>HtmlEditor<span style="font-family: 宋体;">的值的代码：</span></p>
<div style="border: 0.5pt solid windowtext; padding: 4px 5.4pt; background: rgb(230, 230, 230) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 95%;">
<div><img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">获得HtmlEditor的带格式文本&nbsp;framename:HtmlEditor的iframe名称</span><span style="color: rgb(0, 128, 0);"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: rgb(0, 0, 255);">function</span><span style="color: rgb(0, 0, 0);">&nbsp;getEditorHTML(framename)<br />
<img onclick="this.style.display='none'; document.getElementById('_85_315_Open_Text').style.display='none'; document.getElementById('_85_315_Closed_Image').style.display='inline'; document.getElementById('_85_315_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" id="_85_315_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_85_315_Closed_Text').style.display='none'; document.getElementById('_85_315_Open_Image').style.display='inline'; document.getElementById('_85_315_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" id="_85_315_Closed_Image" alt="" align="top" /></span><span id="_85_315_Open_Text"><span style="color: rgb(0, 0, 0);">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">&nbsp;html&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;window.frames[framename].frames[</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">HtmlEditor</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">].document.getElementsByTagName(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">BODY</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">)[</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">].innerHTML;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">&nbsp;(&nbsp;(html.toLowerCase()&nbsp;</span><span style="color: rgb(0, 0, 0);">==</span>&nbsp;<span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&lt;p&gt;&amp;nbsp;&lt;/p&gt;</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">)&nbsp;</span><span style="color: rgb(0, 0, 0);">||</span><span style="color: rgb(0, 0, 0);">&nbsp;(html.toLowerCase()&nbsp;</span><span style="color: rgb(0, 0, 0);">==</span>&nbsp;<span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&lt;p&gt;&lt;/p&gt;</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">)&nbsp;)<br />
<img onclick="this.style.display='none'; document.getElementById('_283_299_Open_Text').style.display='none'; document.getElementById('_283_299_Closed_Image').style.display='inline'; document.getElementById('_283_299_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_283_299_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_283_299_Closed_Text').style.display='none'; document.getElementById('_283_299_Open_Image').style.display='inline'; document.getElementById('_283_299_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_283_299_Closed_Image" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_283_299_Open_Text"><span style="color: rgb(0, 0, 0);">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;html&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span>&nbsp;<span style="color: rgb(0, 0, 0);">""</span><span style="color: rgb(0, 0, 0);">;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">&nbsp;html;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" alt="" align="top" />}</span></span></div>
</div>
js源代码如下:<br />
<div style="border: 0.5pt solid windowtext; padding: 4px 5.4pt; background: rgb(230, 230, 230) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 95%;">
<div><img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">&nbsp;EDITOR_DEFAULT_VALUE&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span>&nbsp;<span style="color: rgb(0, 0, 0);">""</span><span style="color: rgb(0, 0, 0);">;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">全局变量,用于向Editor控件传递值</span><span style="color: rgb(0, 128, 0);"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: rgb(0, 0, 0);"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: rgb(0, 0, 255);">function</span><span style="color: rgb(0, 0, 0);">&nbsp;init()<br />
<img onclick="this.style.display='none'; document.getElementById('_73_159_Open_Text').style.display='none'; document.getElementById('_73_159_Closed_Image').style.display='inline'; document.getElementById('_73_159_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" id="_73_159_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_73_159_Closed_Text').style.display='none'; document.getElementById('_73_159_Open_Image').style.display='inline'; document.getElementById('_73_159_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" id="_73_159_Closed_Image" alt="" align="top" /></span><span id="_73_159_Open_Text"><span style="color: rgb(0, 0, 0);">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">&nbsp;obj&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;document.getElementById(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">taContent</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;obj.value&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span>&nbsp;<span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&lt;b&gt;粗体&lt;/b&gt;&lt;i&gt;斜体&lt;/i&gt;</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" alt="" align="top" />}</span></span><span style="color: rgb(0, 0, 0);"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">containername:存放iframe的容器名称&nbsp;framename:HtmlEditor的iframe名称&nbsp;editorpath:编辑器index.html的路径</span><span style="color: rgb(0, 128, 0);"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: rgb(0, 0, 255);">function</span><span style="color: rgb(0, 0, 0);">&nbsp;createEditor(containername,framename,editorpath)<br />
<img onclick="this.style.display='none'; document.getElementById('_308_724_Open_Text').style.display='none'; document.getElementById('_308_724_Closed_Image').style.display='inline'; document.getElementById('_308_724_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" id="_308_724_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_308_724_Closed_Text').style.display='none'; document.getElementById('_308_724_Open_Image').style.display='inline'; document.getElementById('_308_724_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" id="_308_724_Closed_Image" alt="" align="top" /></span><span id="_308_724_Open_Text"><span style="color: rgb(0, 0, 0);">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(0, 0, 0);">!</span><span style="color: rgb(0, 0, 0);">document.getElementById(framename))<br />
<img onclick="this.style.display='none'; document.getElementById('_352_722_Open_Text').style.display='none'; document.getElementById('_352_722_Closed_Image').style.display='inline'; document.getElementById('_352_722_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_352_722_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_352_722_Closed_Text').style.display='none'; document.getElementById('_352_722_Open_Image').style.display='inline'; document.getElementById('_352_722_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_352_722_Closed_Image" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_352_722_Open_Text"><span style="color: rgb(0, 0, 0);">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">&nbsp;HTMLEDITOR&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;document.createElement(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">iframe</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HTMLEDITOR.id&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;framename;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HTMLEDITOR.name&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;framename;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HTMLEDITOR.src&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;editorpath;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HTMLEDITOR.frameBorder&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span>&nbsp;<span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HTMLEDITOR.marginHeight&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span>&nbsp;<span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HTMLEDITOR.marginWidth&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span>&nbsp;<span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HTMLEDITOR.height&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span>&nbsp;<span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">238</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HTMLEDITOR.width&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span>&nbsp;<span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">400</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;document.getElementById(containername).appendChild(HTMLEDITOR);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" alt="" align="top" />}</span></span><span style="color: rgb(0, 0, 0);"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">设置初始值</span><span style="color: rgb(0, 128, 0);"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: rgb(0, 0, 255);">function</span><span style="color: rgb(0, 0, 0);">&nbsp;setEditorDefaultValue(text)<br />
<img onclick="this.style.display='none'; document.getElementById('_772_804_Open_Text').style.display='none'; document.getElementById('_772_804_Closed_Image').style.display='inline'; document.getElementById('_772_804_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" id="_772_804_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_772_804_Closed_Text').style.display='none'; document.getElementById('_772_804_Open_Image').style.display='inline'; document.getElementById('_772_804_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" id="_772_804_Closed_Image" alt="" align="top" /></span><span id="_772_804_Open_Text"><span style="color: rgb(0, 0, 0);">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;EDITOR_DEFAULT_VALUE&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;text;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" alt="" align="top" />}</span></span><span style="color: rgb(0, 0, 0);"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">得到textarea的值</span><span style="color: rgb(0, 128, 0);"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: rgb(0, 0, 255);">function</span><span style="color: rgb(0, 0, 0);">&nbsp;getTextareaValue()<br />
<img onclick="this.style.display='none'; document.getElementById('_850_920_Open_Text').style.display='none'; document.getElementById('_850_920_Closed_Image').style.display='inline'; document.getElementById('_850_920_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" id="_850_920_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_850_920_Closed_Text').style.display='none'; document.getElementById('_850_920_Open_Image').style.display='inline'; document.getElementById('_850_920_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" id="_850_920_Closed_Image" alt="" align="top" /></span><span id="_850_920_Open_Text"><span style="color: rgb(0, 0, 0);">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">&nbsp;obj&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;document.getElementById(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">taContent</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">&nbsp;obj.value;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" alt="" align="top" />}</span></span><span style="color: rgb(0, 0, 0);"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">获得HtmlEditor的带格式文本&nbsp;framename:HtmlEditor的iframe名称</span><span style="color: rgb(0, 128, 0);"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: rgb(0, 0, 255);">function</span><span style="color: rgb(0, 0, 0);">&nbsp;getEditorHTML(framename)<br />
<img onclick="this.style.display='none'; document.getElementById('_1008_1238_Open_Text').style.display='none'; document.getElementById('_1008_1238_Closed_Image').style.display='inline'; document.getElementById('_1008_1238_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" id="_1008_1238_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_1008_1238_Closed_Text').style.display='none'; document.getElementById('_1008_1238_Open_Image').style.display='inline'; document.getElementById('_1008_1238_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" id="_1008_1238_Closed_Image" alt="" align="top" /></span><span id="_1008_1238_Open_Text"><span style="color: rgb(0, 0, 0);">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">&nbsp;html&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;window.frames[framename].frames[</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">HtmlEditor</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">].document.getElementsByTagName(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">BODY</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">)[</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">].innerHTML;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">&nbsp;(&nbsp;(html.toLowerCase()&nbsp;</span><span style="color: rgb(0, 0, 0);">==</span>&nbsp;<span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&lt;p&gt;&amp;nbsp;&lt;/p&gt;</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">)&nbsp;</span><span style="color: rgb(0, 0, 0);">||</span><span style="color: rgb(0, 0, 0);">&nbsp;(html.toLowerCase()&nbsp;</span><span style="color: rgb(0, 0, 0);">==</span>&nbsp;<span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&lt;p&gt;&lt;/p&gt;</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">)&nbsp;)<br />
<img onclick="this.style.display='none'; document.getElementById('_1206_1222_Open_Text').style.display='none'; document.getElementById('_1206_1222_Closed_Image').style.display='inline'; document.getElementById('_1206_1222_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_1206_1222_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_1206_1222_Closed_Text').style.display='none'; document.getElementById('_1206_1222_Open_Image').style.display='inline'; document.getElementById('_1206_1222_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_1206_1222_Closed_Image" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_1206_1222_Open_Text"><span style="color: rgb(0, 0, 0);">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;html&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span>&nbsp;<span style="color: rgb(0, 0, 0);">""</span><span style="color: rgb(0, 0, 0);">;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">&nbsp;html;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" alt="" align="top" />}</span></span><span style="color: rgb(0, 0, 0);"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">设置HtmlEditor的文本&nbsp;framename:HtmlEditor的iframe名称&nbsp;html_text:带格式的文本</span><span style="color: rgb(0, 128, 0);"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: rgb(0, 0, 255);">function</span><span style="color: rgb(0, 0, 0);">&nbsp;setEditorText(framename,html_text)<br />
<img onclick="this.style.display='none'; document.getElementById('_1350_1605_Open_Text').style.display='none'; document.getElementById('_1350_1605_Closed_Image').style.display='inline'; document.getElementById('_1350_1605_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" id="_1350_1605_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_1350_1605_Closed_Text').style.display='none'; document.getElementById('_1350_1605_Open_Image').style.display='inline'; document.getElementById('_1350_1605_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" id="_1350_1605_Closed_Image" alt="" align="top" /></span><span id="_1350_1605_Open_Text"><span style="color: rgb(0, 0, 0);">{&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;HtmlEditor_Default_Value&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;html_text;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(window.frames[framename].frames[</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">HtmlEditor</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">]&nbsp;</span><span style="color: rgb(0, 0, 0);">!=</span>&nbsp;<span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">)<br />
<img onclick="this.style.display='none'; document.getElementById('_1454_1603_Open_Text').style.display='none'; document.getElementById('_1454_1603_Closed_Image').style.display='inline'; document.getElementById('_1454_1603_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_1454_1603_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_1454_1603_Closed_Text').style.display='none'; document.getElementById('_1454_1603_Open_Image').style.display='inline'; document.getElementById('_1454_1603_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_1454_1603_Closed_Image" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_1454_1603_Open_Text"><span style="color: rgb(0, 0, 0);">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">&nbsp;html&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;window.frames[framename].frames[</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">HtmlEditor</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">].document.getElementsByTagName(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">BODY</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">)[</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">];<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;html.innerHTML&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;HtmlEditor_Default_Value;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" alt="" align="top" />}</span></span></div>
</div>
<br />
源代码:<a title="点击下载" target="_blank" href="http://www.cnblogs.com/Files/redleaf1995/editor.rar">http://www.cnblogs.com/Files/redleaf1995/editor.rar</a>
<img src="http://www.cnblogs.com/redleaf1995/aggbug/1155761.html?type=1" width="1" height="1" alt=""/><p>评论: 1　<a href="http://www.cnblogs.com/redleaf1995/archive/2008/04/16/1155761.html#pagedcomment" target="_blank">查看评论</a>　<a href="http://www.cnblogs.com/redleaf1995/archive/2008/04/16/1155761.html#commentform" target="_blank">发表评论</a></p><hr/><p>最新新闻：<br/>· <a href="http://news.cnblogs.com/n/56857/" target="_blank">Facebook与美国在线合作 整合AIM动态功能</a><span style="color:gray">(2010-02-10 16:41)</span><br/>· <a href="http://news.cnblogs.com/n/56855/" target="_blank">NDepend 3.0已与Visual Studio集成</a><span style="color:gray">(2010-02-10 16:17)</span><br/>· <a href="http://news.cnblogs.com/n/56854/" target="_blank">Ruby in Steel 1.5发布，去除IronRuby支持</a><span style="color:gray">(2010-02-10 16:14)</span><br/>· <a href="http://news.cnblogs.com/n/56852/" target="_blank">淘宝网通过索引模式涉足网络文学</a><span style="color:gray">(2010-02-10 15:59)</span><br/>· <a href="http://news.cnblogs.com/n/56851/" target="_blank">苹果发布 iPhone/iPad SDK 3.2 beta2 开发包</a><span style="color:gray">(2010-02-10 15:37)</span><br/></p><p>编辑推荐：<a href="http://news.cnblogs.com/news/tag/Buzz/" target="_blank">Google Buzz相关新闻</a><br/></p><p>网站导航：<a href="http://www.cnblogs.com" target="_blank">博客园首页</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/" target="_blank">个人主页</a>&nbsp;&nbsp;<a href="http://news.cnblogs.com" target="_blank">新闻</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/ing/" target="_blank">闪存</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/group/" target="_blank">小组</a>&nbsp;&nbsp;<a href="http://space.cnblogs.com/q/" target="_blank">博问</a>&nbsp;&nbsp;<a href="http://space.cnblogs.com" target="_blank">社区</a>&nbsp;&nbsp;<a href="http://kb.cnblogs.com" target="_blank">知识库</a></p>]]></description></item><item><title>javascript中的自定义属性的应用--避免频繁访问数据库</title><link>http://www.cnblogs.com/redleaf1995/archive/2008/04/15/1154152.html</link><dc:creator>红色枫叶</dc:creator><author>红色枫叶</author><pubDate>Tue, 15 Apr 2008 03:58:00 GMT</pubDate><guid>http://www.cnblogs.com/redleaf1995/archive/2008/04/15/1154152.html</guid><description><![CDATA[<p>阅读: 458 评论: 5 作者: <a href="http://www.cnblogs.com/redleaf1995/" target="_blank">红色枫叶</a> 发表于 2008-04-15 11:58 <a href="http://www.cnblogs.com/redleaf1995/archive/2008/04/15/1154152.html" target="_blank">原文链接</a></p><p><span style="font-family: 宋体;">在</span>WEB<span style="font-family: 宋体;">应用程序中，经常需要将数据从数据库中取出来，填充到</span>HTML<span style="font-family: 宋体;">控件中，然后再存回数据库。</span></p>
<p><span style="font-family: 宋体;">如果数据并未改动，仍然占用网络资源存入数据库，则对网络资源是一种浪费，当页面数据很多和网络访问量很大时，就会形成性能的瓶颈。如何能在提交数据前进行判断呢？</span></p>
<p><span style="font-family: 宋体;">一种方法是建隐藏控件或定义全局变量，这种情况适用于控件很少时，若一个表单页面有数十项时，建隐藏控件太多反而降低性能，定义全局变量不容易记忆。</span></p>
<p><span style="font-family: 宋体;">另一种方法，就是在原有控件中增加自定义属性，这样，既能避免逻辑复杂，又能节省网络流量。</span></p>
<p><span style="font-family: 宋体;">如页面中有一文本框</span>:</p>
<p><span>
<div style="border: 0.5pt solid windowtext; padding: 4px 5.4pt; background: rgb(230, 230, 230) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 95%;">
<div><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">input&nbsp;</span><span style="color: rgb(255, 0, 0);">type</span><span style="color: rgb(0, 0, 255);">="text"</span><span style="color: rgb(255, 0, 0);">&nbsp;id</span><span style="color: rgb(0, 0, 255);">="txtName"</span><span style="color: rgb(0, 0, 255);">&gt;</span></div>
</div>
</span><br />
<span style="font-family: 宋体;">在页面的</span>onload<span style="font-family: 宋体;">事件中加入如下代码：</span></p>
<br />
<div style="border: 0.5pt solid windowtext; padding: 4px 5.4pt; background: rgb(230, 230, 230) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 95%;">
<div>
<div style="border: 0.5pt solid windowtext; padding: 4px 5.4pt; background: rgb(230, 230, 230) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 95%;">
<div><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /><span style="color: rgb(0, 0, 255);">function</span><span style="color: rgb(0, 0, 0);">&nbsp;initvalue()<br />
<img alt="" id="_21_183_Open_Image" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" onclick="this.style.display='none'; document.getElementById('_21_183_Open_Text').style.display='none'; document.getElementById('_21_183_Closed_Image').style.display='inline'; document.getElementById('_21_183_Closed_Text').style.display='inline';" align="top" /><img alt="" id="_21_183_Closed_Image" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" style="display: none;" onclick="this.style.display='none'; document.getElementById('_21_183_Closed_Text').style.display='none'; document.getElementById('_21_183_Open_Image').style.display='inline'; document.getElementById('_21_183_Open_Text').style.display='inline';" align="top" /></span><span id="_21_183_Open_Text"><span style="color: rgb(0, 0, 0);">{<br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">&nbsp;xm&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span>&nbsp;<span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">张三</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">假设从数据库中取得</span><span style="color: rgb(0, 128, 0);"><br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /></span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">&nbsp;obj&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;document.getElementById(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">txtName</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;obj.value&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;xm;<br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;obj.setAttribute(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">originValue</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">,xm);<br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span></div>
</div>
<br />
</div>
</div>
页面添加一按钮,其点击事件onclick如下:<br />
<div style="border: 0.5pt solid windowtext; padding: 4px 5.4pt; background: rgb(230, 230, 230) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 95%;">
<div><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /><span style="color: rgb(0, 0, 255);">function</span><span style="color: rgb(0, 0, 0);">&nbsp;upload()<br />
<img alt="" id="_18_297_Open_Image" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" onclick="this.style.display='none'; document.getElementById('_18_297_Open_Text').style.display='none'; document.getElementById('_18_297_Closed_Image').style.display='inline'; document.getElementById('_18_297_Closed_Text').style.display='inline';" align="top" /><img alt="" id="_18_297_Closed_Image" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" style="display: none;" onclick="this.style.display='none'; document.getElementById('_18_297_Closed_Text').style.display='none'; document.getElementById('_18_297_Open_Image').style.display='inline'; document.getElementById('_18_297_Open_Text').style.display='inline';" align="top" /></span><span id="_18_297_Open_Text"><span style="color: rgb(0, 0, 0);">{<br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">&nbsp;obj&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;document.getElementById(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">txtName</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">&nbsp;xm&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;obj.value;<br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">&nbsp;origin_xm&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;getCustomAttributeValue(obj,</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">originValue</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(xm&nbsp;</span><span style="color: rgb(0, 0, 0);">==</span><span style="color: rgb(0, 0, 0);">&nbsp;origin_xm)<br />
<img alt="" id="_171_198_Open_Image" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" onclick="this.style.display='none'; document.getElementById('_171_198_Open_Text').style.display='none'; document.getElementById('_171_198_Closed_Image').style.display='inline'; document.getElementById('_171_198_Closed_Text').style.display='inline';" align="top" /><img alt="" id="_171_198_Closed_Image" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" style="display: none;" onclick="this.style.display='none'; document.getElementById('_171_198_Closed_Text').style.display='none'; document.getElementById('_171_198_Open_Image').style.display='inline'; document.getElementById('_171_198_Open_Text').style.display='inline';" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_171_198_Open_Text"><span style="color: rgb(0, 0, 0);">{<br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alert(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">值未变,不需存回数据库</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">else</span><span style="color: rgb(0, 0, 0);"><br />
<img alt="" id="_207_295_Open_Image" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" onclick="this.style.display='none'; document.getElementById('_207_295_Open_Text').style.display='none'; document.getElementById('_207_295_Closed_Image').style.display='inline'; document.getElementById('_207_295_Closed_Text').style.display='inline';" align="top" /><img alt="" id="_207_295_Closed_Image" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" style="display: none;" onclick="this.style.display='none'; document.getElementById('_207_295_Closed_Text').style.display='none'; document.getElementById('_207_295_Open_Image').style.display='inline'; document.getElementById('_207_295_Open_Text').style.display='inline';" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_207_295_Open_Text"><span style="color: rgb(0, 0, 0);">{<br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alert(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">值已发生改变,可以写回! 初始值为:</span><span style="color: rgb(0, 0, 0);">"</span>&nbsp;<span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);">&nbsp;origin_xm&nbsp;</span><span style="color: rgb(0, 0, 0);">+</span>&nbsp;<span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> 当前值为:</span><span style="color: rgb(0, 0, 0);">"</span>&nbsp;<span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);">&nbsp;xm);<br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">写回数据库...</span><span style="color: rgb(0, 128, 0);"><br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /></span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">...</span><span style="color: rgb(0, 128, 0);"><br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" /></span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span></div>
</div>
代码如下:<br />
<div style="border: 0.5pt solid windowtext; padding: 4px 5.4pt; background: rgb(230, 230, 230) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 95%;">
<div><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">html</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /></span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">head</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">title</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">自定义属性应用</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">title</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br />
<img alt="" id="_69_867_Open_Image" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" onclick="this.style.display='none'; document.getElementById('_69_867_Open_Text').style.display='none'; document.getElementById('_69_867_Closed_Image').style.display='inline'; document.getElementById('_69_867_Closed_Text').style.display='inline';" align="top" /><img alt="" id="_69_867_Closed_Image" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" style="display: none;" onclick="this.style.display='none'; document.getElementById('_69_867_Closed_Text').style.display='none'; document.getElementById('_69_867_Open_Image').style.display='inline'; document.getElementById('_69_867_Open_Text').style.display='inline';" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">script&nbsp;</span><span style="color: rgb(255, 0, 0);">language</span><span style="color: rgb(0, 0, 255);">="javascript"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span id="_69_867_Open_Text"><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"><br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);">function</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;initvalue()<br />
<img alt="" id="_95_239_Open_Image" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" onclick="this.style.display='none'; document.getElementById('_95_239_Open_Text').style.display='none'; document.getElementById('_95_239_Closed_Image').style.display='inline'; document.getElementById('_95_239_Closed_Text').style.display='inline';" align="top" /><img alt="" id="_95_239_Closed_Image" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" style="display: none;" onclick="this.style.display='none'; document.getElementById('_95_239_Closed_Text').style.display='none'; document.getElementById('_95_239_Open_Image').style.display='inline'; document.getElementById('_95_239_Open_Text').style.display='inline';" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_95_239_Open_Text"><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">{<br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);">var</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;xm&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">=</span>&nbsp;<span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">张三</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0);">//</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0);">假设从数据库中取得</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0);"><br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /></span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);">var</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;obj&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">=</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;document.getElementById(</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">txtName</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">);<br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;obj.value&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">=</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;xm;<br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;obj.setAttribute(</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">originValue</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">,xm);<br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"><br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);">function</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;upload()<br />
<img alt="" id="_266_573_Open_Image" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" onclick="this.style.display='none'; document.getElementById('_266_573_Open_Text').style.display='none'; document.getElementById('_266_573_Closed_Image').style.display='inline'; document.getElementById('_266_573_Closed_Text').style.display='inline';" align="top" /><img alt="" id="_266_573_Closed_Image" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" style="display: none;" onclick="this.style.display='none'; document.getElementById('_266_573_Closed_Text').style.display='none'; document.getElementById('_266_573_Open_Image').style.display='inline'; document.getElementById('_266_573_Open_Text').style.display='inline';" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_266_573_Open_Text"><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">{<br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);">var</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;obj&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">=</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;document.getElementById(</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">txtName</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">);<br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);">var</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;xm&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">=</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;obj.value;<br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);">var</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;origin_xm&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">=</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;getCustomAttributeValue(obj,</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">originValue</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">);<br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);">if</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">(xm&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">==</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;origin_xm)<br />
<img alt="" id="_429_460_Open_Image" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" onclick="this.style.display='none'; document.getElementById('_429_460_Open_Text').style.display='none'; document.getElementById('_429_460_Closed_Image').style.display='inline'; document.getElementById('_429_460_Closed_Text').style.display='inline';" align="top" /><img alt="" id="_429_460_Closed_Image" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" style="display: none;" onclick="this.style.display='none'; document.getElementById('_429_460_Closed_Text').style.display='none'; document.getElementById('_429_460_Open_Image').style.display='inline'; document.getElementById('_429_460_Open_Text').style.display='inline';" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_429_460_Open_Text"><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">{<br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alert(</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">值未变,不需存回数据库</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">);<br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"><br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);">else</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"><br />
<img alt="" id="_473_569_Open_Image" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" onclick="this.style.display='none'; document.getElementById('_473_569_Open_Text').style.display='none'; document.getElementById('_473_569_Closed_Image').style.display='inline'; document.getElementById('_473_569_Closed_Text').style.display='inline';" align="top" /><img alt="" id="_473_569_Closed_Image" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" style="display: none;" onclick="this.style.display='none'; document.getElementById('_473_569_Closed_Text').style.display='none'; document.getElementById('_473_569_Open_Image').style.display='inline'; document.getElementById('_473_569_Open_Text').style.display='inline';" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_473_569_Open_Text"><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">{<br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alert(</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">值已发生改变,可以写回! 初始值为:</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span>&nbsp;<span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">+</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;origin_xm&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">+</span>&nbsp;<span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"> 当前值为:</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span>&nbsp;<span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">+</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;xm);<br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0);">//</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0);">写回数据库...</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0);"><br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /></span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0);">//</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0);">...</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0);"><br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" /></span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"><br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"><br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);">function</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;getCustomAttributeValue(obj,attr)<br />
<img alt="" id="_625_725_Open_Image" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" onclick="this.style.display='none'; document.getElementById('_625_725_Open_Text').style.display='none'; document.getElementById('_625_725_Closed_Image').style.display='inline'; document.getElementById('_625_725_Closed_Text').style.display='inline';" align="top" /><img alt="" id="_625_725_Closed_Image" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" style="display: none;" onclick="this.style.display='none'; document.getElementById('_625_725_Closed_Text').style.display='none'; document.getElementById('_625_725_Open_Image').style.display='inline'; document.getElementById('_625_725_Open_Text').style.display='inline';" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_625_725_Open_Text"><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">{<br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);">if</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">(obj.attributes[attr])<br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);">return</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;obj.attributes[attr].nodeValue;<br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);">else</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"><br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);">return</span>&nbsp;<span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);">null</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">;<br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"><br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);">function</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;setCustomAttributeValue(obj,attr,value)<br />
<img alt="" id="_786_865_Open_Image" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" onclick="this.style.display='none'; document.getElementById('_786_865_Open_Text').style.display='none'; document.getElementById('_786_865_Closed_Image').style.display='inline'; document.getElementById('_786_865_Closed_Text').style.display='inline';" align="top" /><img alt="" id="_786_865_Closed_Image" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" style="display: none;" onclick="this.style.display='none'; document.getElementById('_786_865_Closed_Text').style.display='none'; document.getElementById('_786_865_Open_Image').style.display='inline'; document.getElementById('_786_865_Open_Text').style.display='inline';" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_786_865_Open_Text"><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">{<br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);">if</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">(value&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">!=</span>&nbsp;<span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);">null</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">)<br />
<img alt="" id="_812_861_Open_Image" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" onclick="this.style.display='none'; document.getElementById('_812_861_Open_Text').style.display='none'; document.getElementById('_812_861_Closed_Image').style.display='inline'; document.getElementById('_812_861_Closed_Text').style.display='inline';" align="top" /><img alt="" id="_812_861_Closed_Image" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" style="display: none;" onclick="this.style.display='none'; document.getElementById('_812_861_Closed_Text').style.display='none'; document.getElementById('_812_861_Open_Image').style.display='inline'; document.getElementById('_812_861_Open_Text').style.display='inline';" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_812_861_Open_Text"><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">{<br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;obj.attributes[attr].nodeValue&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">=</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;value;<br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"><br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"><br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">script</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /></span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">head</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /></span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">body&nbsp;</span><span style="color: rgb(255, 0, 0);">onload</span><span style="color: rgb(0, 0, 255);">="initvalue();"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">input&nbsp;</span><span style="color: rgb(255, 0, 0);">type</span><span style="color: rgb(0, 0, 255);">="text"</span><span style="color: rgb(255, 0, 0);">&nbsp;id</span><span style="color: rgb(0, 0, 255);">="txtName"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">input&nbsp;</span><span style="color: rgb(255, 0, 0);">type</span><span style="color: rgb(0, 0, 255);">="button"</span><span style="color: rgb(255, 0, 0);">&nbsp;value</span><span style="color: rgb(0, 0, 255);">="存回数据库"</span><span style="color: rgb(255, 0, 0);">&nbsp;onclick</span><span style="color: rgb(0, 0, 255);">="upload();"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /></span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">body</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br />
<img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" _fcksavedurl="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /></span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">html</span><span style="color: rgb(0, 0, 255);">&gt;</span></div>
</div>
<br />
源代码:<a title="点击下载" target="_blank" href="http://www.cnblogs.com/Files/redleaf1995/jsSaveDB.rar">http://www.cnblogs.com/Files/redleaf1995/jsSaveDB.rar</a>
<img src="http://www.cnblogs.com/redleaf1995/aggbug/1154152.html?type=1" width="1" height="1" alt=""/><p>评论: 5　<a href="http://www.cnblogs.com/redleaf1995/archive/2008/04/15/1154152.html#pagedcomment" target="_blank">查看评论</a>　<a href="http://www.cnblogs.com/redleaf1995/archive/2008/04/15/1154152.html#commentform" target="_blank">发表评论</a></p><hr/><p>最新新闻：<br/>· <a href="http://news.cnblogs.com/n/56857/" target="_blank">Facebook与美国在线合作 整合AIM动态功能</a><span style="color:gray">(2010-02-10 16:41)</span><br/>· <a href="http://news.cnblogs.com/n/56855/" target="_blank">NDepend 3.0已与Visual Studio集成</a><span style="color:gray">(2010-02-10 16:17)</span><br/>· <a href="http://news.cnblogs.com/n/56854/" target="_blank">Ruby in Steel 1.5发布，去除IronRuby支持</a><span style="color:gray">(2010-02-10 16:14)</span><br/>· <a href="http://news.cnblogs.com/n/56852/" target="_blank">淘宝网通过索引模式涉足网络文学</a><span style="color:gray">(2010-02-10 15:59)</span><br/>· <a href="http://news.cnblogs.com/n/56851/" target="_blank">苹果发布 iPhone/iPad SDK 3.2 beta2 开发包</a><span style="color:gray">(2010-02-10 15:37)</span><br/></p><p>编辑推荐：<a href="http://news.cnblogs.com/news/tag/Buzz/" target="_blank">Google Buzz相关新闻</a><br/></p><p>网站导航：<a href="http://www.cnblogs.com" target="_blank">博客园首页</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/" target="_blank">个人主页</a>&nbsp;&nbsp;<a href="http://news.cnblogs.com" target="_blank">新闻</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/ing/" target="_blank">闪存</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/group/" target="_blank">小组</a>&nbsp;&nbsp;<a href="http://space.cnblogs.com/q/" target="_blank">博问</a>&nbsp;&nbsp;<a href="http://space.cnblogs.com" target="_blank">社区</a>&nbsp;&nbsp;<a href="http://kb.cnblogs.com" target="_blank">知识库</a></p>]]></description></item><item><title>用javascript添加控件自定义属性</title><link>http://www.cnblogs.com/redleaf1995/archive/2008/04/14/1152317.html</link><dc:creator>红色枫叶</dc:creator><author>红色枫叶</author><pubDate>Mon, 14 Apr 2008 02:42:00 GMT</pubDate><guid>http://www.cnblogs.com/redleaf1995/archive/2008/04/14/1152317.html</guid><description><![CDATA[<p>阅读: 1623 评论: 0 作者: <a href="http://www.cnblogs.com/redleaf1995/" target="_blank">红色枫叶</a> 发表于 2008-04-14 10:42 <a href="http://www.cnblogs.com/redleaf1995/archive/2008/04/14/1152317.html" target="_blank">原文链接</a></p><p><span style="font-family: 宋体;">前面说过为</span>HTML<span style="font-family: 宋体;">元素添加自定义的属性，是通过手动在</span>HTML<span style="font-family: 宋体;">控件中加上，其实可以在</span>javascript<span style="font-family: 宋体;">中动态添加：如有一文本框：</span></p>
<div style="border: 0.5pt solid windowtext; padding: 4px 5.4pt; background: #e6e6e6 none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 95%;">
<div><img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">input&nbsp;</span><span style="color: #ff0000;">type</span><span style="color: #0000ff;">="text"</span><span style="color: #ff0000;">&nbsp;id</span><span style="color: #0000ff;">="txtInput"</span><span style="color: #ff0000;">&nbsp;name</span><span style="color: #0000ff;">="txtInput"</span><span style="color: #ff0000;">&nbsp;value</span><span style="color: #0000ff;">="自定义文本"</span><span style="color: #0000ff;">&gt;</span></div>
</div>
<p><span style="font-family: 宋体;">如想增加</span>idvalue<span style="font-family: 宋体;">属性</span>(<span style="font-family: 宋体;">值为</span>&#8221;<span style="font-family: 宋体;">自定义值</span>&#8221;)<span style="font-family: 宋体;">，可以在</span>javascript<span style="font-family: 宋体;">中这样写</span>:</p>
<div style="border: 0.5pt solid windowtext; padding: 4px 5.4pt; background: #e6e6e6 none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 95%;">
<div><img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /><span style="color: #0000ff;">var</span><span style="color: #000000;">&nbsp;txt&nbsp;</span><span style="color: #000000;">=</span><span style="color: #000000;">&nbsp;document.getElementById(</span><span style="color: #000000;">"</span><span style="color: #000000;">txtInput</span><span style="color: #000000;">"</span><span style="color: #000000;">);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />txt.setAttribute(</span><span style="color: #000000;">"</span><span style="color: #000000;">idvalue</span><span style="color: #000000;">"</span><span style="color: #000000;">,</span><span style="color: #000000;">"</span><span style="color: #000000;">自定义值</span><span style="color: #000000;">"</span><span style="color: #000000;">);</span></div>
</div>
<p>setAttribute<span style="font-family: 宋体;">中第一个参数是指明自定义属性的名称，第二个参数是初始值</span></p>
代码如下:<br />
<div style="border: 0.5pt solid windowtext; padding: 4px 5.4pt; background: #e6e6e6 none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 95%;">
<div><img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" 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 />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" 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 />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">title</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">用javascript添加控件自定义属性</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">title</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img onclick="this.style.display='none'; document.getElementById('_82_347_Open_Text').style.display='none'; document.getElementById('_82_347_Closed_Image').style.display='inline'; document.getElementById('_82_347_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" id="_82_347_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_82_347_Closed_Text').style.display='none'; document.getElementById('_82_347_Open_Image').style.display='inline'; document.getElementById('_82_347_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" id="_82_347_Closed_Image" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</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="_82_347_Open_Text"><span style="background-color: #f5f5f5; color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">function</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;addCustomAttribute()<br />
<img onclick="this.style.display='none'; document.getElementById('_117_210_Open_Text').style.display='none'; document.getElementById('_117_210_Closed_Image').style.display='inline'; document.getElementById('_117_210_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_117_210_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_117_210_Closed_Text').style.display='none'; document.getElementById('_117_210_Open_Image').style.display='inline'; document.getElementById('_117_210_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_117_210_Closed_Image" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_117_210_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;txt&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;document.getElementById(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">txtInput</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;txt.setAttribute(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">idvalue</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">,</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">自定义值</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">function</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;showIdValue()<br />
<img onclick="this.style.display='none'; document.getElementById('_242_345_Open_Text').style.display='none'; document.getElementById('_242_345_Closed_Image').style.display='inline'; document.getElementById('_242_345_Closed_Text').style.display='inline';" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" id="_242_345_Open_Image" alt="" align="top" /><img onclick="this.style.display='none'; document.getElementById('_242_345_Closed_Text').style.display='none'; document.getElementById('_242_345_Open_Image').style.display='inline'; document.getElementById('_242_345_Open_Text').style.display='inline';" style="display: none;" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" id="_242_345_Closed_Image" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="_242_345_Open_Text"><span style="background-color: #f5f5f5; color: #000000;">{<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;txt&nbsp;</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">&nbsp;document.getElementById(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">txtInput</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alert(txt.attributes[</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">idvalue</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">].nodeValue);<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="background-color: #f5f5f5; color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</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 />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" 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 />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">body&nbsp;</span><span style="color: #ff0000;">onload</span><span style="color: #0000ff;">="addCustomAttribute();"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">input&nbsp;</span><span style="color: #ff0000;">type</span><span style="color: #0000ff;">="text"</span><span style="color: #ff0000;">&nbsp;id</span><span style="color: #0000ff;">="txtInput"</span><span style="color: #ff0000;">&nbsp;name</span><span style="color: #0000ff;">="txtInput"</span><span style="color: #ff0000;">&nbsp;value</span><span style="color: #0000ff;">="自定义文本"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">input&nbsp;</span><span style="color: #ff0000;">type</span><span style="color: #0000ff;">="button"</span><span style="color: #ff0000;">&nbsp;value</span><span style="color: #0000ff;">="显示idValue"</span><span style="color: #ff0000;">&nbsp;onclick</span><span style="color: #0000ff;">="showIdValue();"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" 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 />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">html</span><span style="color: #0000ff;">&gt;</span></div>
</div>
<br />
源代码:<a title="点击下载" target="_blank" href="http://www.cnblogs.com/Files/redleaf1995/jsCustom.rar"><a target="_blank" href="http://www.cnblogs.com/Files/redleaf1995/jsCustom.rar">http://www.cnblogs.com/Files/redleaf1995/jsCustom.rar</a></a><a target="_blank" href="http://www.cnblogs.com/Files/redleaf1995/jsCustom.rar"></a>
<img src="http://www.cnblogs.com/redleaf1995/aggbug/1152317.html?type=1" width="1" height="1" alt=""/><p>评论: 0　<a href="http://www.cnblogs.com/redleaf1995/archive/2008/04/14/1152317.html#pagedcomment" target="_blank">查看评论</a>　<a href="http://www.cnblogs.com/redleaf1995/archive/2008/04/14/1152317.html#commentform" target="_blank">发表评论</a></p><hr/><p>最新新闻：<br/>· <a href="http://news.cnblogs.com/n/56857/" target="_blank">Facebook与美国在线合作 整合AIM动态功能</a><span style="color:gray">(2010-02-10 16:41)</span><br/>· <a href="http://news.cnblogs.com/n/56855/" target="_blank">NDepend 3.0已与Visual Studio集成</a><span style="color:gray">(2010-02-10 16:17)</span><br/>· <a href="http://news.cnblogs.com/n/56854/" target="_blank">Ruby in Steel 1.5发布，去除IronRuby支持</a><span style="color:gray">(2010-02-10 16:14)</span><br/>· <a href="http://news.cnblogs.com/n/56852/" target="_blank">淘宝网通过索引模式涉足网络文学</a><span style="color:gray">(2010-02-10 15:59)</span><br/>· <a href="http://news.cnblogs.com/n/56851/" target="_blank">苹果发布 iPhone/iPad SDK 3.2 beta2 开发包</a><span style="color:gray">(2010-02-10 15:37)</span><br/></p><p>编辑推荐：<a href="http://news.cnblogs.com/news/tag/Buzz/" target="_blank">Google Buzz相关新闻</a><br/></p><p>网站导航：<a href="http://www.cnblogs.com" target="_blank">博客园首页</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/" target="_blank">个人主页</a>&nbsp;&nbsp;<a href="http://news.cnblogs.com" target="_blank">新闻</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/ing/" target="_blank">闪存</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/group/" target="_blank">小组</a>&nbsp;&nbsp;<a href="http://space.cnblogs.com/q/" target="_blank">博问</a>&nbsp;&nbsp;<a href="http://space.cnblogs.com" target="_blank">社区</a>&nbsp;&nbsp;<a href="http://kb.cnblogs.com" target="_blank">知识库</a></p>]]></description></item></channel></rss>