﻿<?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>Sat, 06 Sep 2008 22:39:14 GMT</lastBuildDate><pubDate>Sat, 06 Sep 2008 22:39:14 GMT</pubDate><ttl>60</ttl><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><wfw:comment>http://www.cnblogs.com/redleaf1995/comments/1170693.html</wfw:comment><comments>http://www.cnblogs.com/redleaf1995/archive/2008/04/25/1170693.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://www.cnblogs.com/redleaf1995/comments/commentRss/1170693.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/redleaf1995/services/trackbacks/1170693.html</trackback:ping><description><![CDATA[摘要: <p><img src="http://www.cnblogs.com/images/cnblogs_com/redleaf1995/131374/r_r_js.png" align="right"/>在CSDN上，看到有人问这个问题。就是若把页面右键屏蔽的话，文本框上的右键菜单同样也给屏蔽，问如何能够将文本框的右键菜单显示出来。<br />解决思路：首先，要在页面初始化时将页面右键菜单屏蔽<br />其次，在欲解除右键限制的文本框获得焦点时，启用页面document的右键菜单。可以用在文本框中的onmousedown事件中，但推荐用在 onfocus事件中，若使用的onmousedown的话，则按键盘上摸拟右键的按键(在右win键右边)不响应；若用onfocus事件，则能顺利响应。<br />最后，当该文本框失去焦点时，需将页面document的右键菜单屏蔽，用文本框的onblur事件即可。</p>&nbsp;&nbsp;<a href='http://www.cnblogs.com/redleaf1995/archive/2008/04/25/1170693.html'>阅读全文</a><img src ="http://www.cnblogs.com/redleaf1995/aggbug/1170693.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/42123/" target="_blank">[新闻]Google 10周年大事记</a>]]></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><wfw:comment>http://www.cnblogs.com/redleaf1995/comments/1165647.html</wfw:comment><comments>http://www.cnblogs.com/redleaf1995/archive/2008/04/24/1165647.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnblogs.com/redleaf1995/comments/commentRss/1165647.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/redleaf1995/services/trackbacks/1165647.html</trackback:ping><description><![CDATA[摘要: <p><img src="http://www.cnblogs.com/images/cnblogs_com/redleaf1995/131374/r_r_js.png" align="right"/>在javascript中,我们经常要对日期格式加以判断,用正则表达式是最为快捷有效的,下面是验证日期格式(YYYY-MM-DD)和日期时间格式(YYYY-MM-DD hh:mm:ss)的正则表达式.<br />var _reDataTime = /^([1-9]\d{3}-((0?[1-9])|(1[0-2]))-((0[1-9])|([1-2]?\d)|(3[0-1])))?$/ 	//日期格式,可为空<br />  var _reTimeReg = /^[1-9][0-9]{3}-(0?[1-9]|1[0|1|2])-(0?[1-9]|[1|2][0-9]|3[0|1])\s(0?[1-9]|1[0-9]|2[0-3]):(0?[0-9]|[1|2|3|4|5][0-9]):(0?[0-9]|[1|2|3|4|5][0-9])$/;		//日期时间格式<br />  下面验证某个字符&nbsp;&nbsp;<a href='http://www.cnblogs.com/redleaf1995/archive/2008/04/24/1165647.html'>阅读全文</a><img src ="http://www.cnblogs.com/redleaf1995/aggbug/1165647.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/42122/" target="_blank">[新闻]Google上下二十年</a>]]></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><wfw:comment>http://www.cnblogs.com/redleaf1995/comments/1163896.html</wfw:comment><comments>http://www.cnblogs.com/redleaf1995/archive/2008/04/21/1163896.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cnblogs.com/redleaf1995/comments/commentRss/1163896.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/redleaf1995/services/trackbacks/1163896.html</trackback:ping><description><![CDATA[摘要: <p><img src="http://www.cnblogs.com/images/cnblogs_com/redleaf1995/131374/r_r_js.png" align="right"/>一个javascript写的media player播放器界面较为简单，支持播放列表 。建立播放列表的步骤为：1)在文本框中输入媒体资源的地址，可以是HTTP地址，相对地址和绝对地址2)点击“添加到媒体列表”按钮，将媒体资源信息放到媒体列表中3)在媒体列表中，点击“添加”链接，将媒体加入到播放列表中4)重复若干遍，加入所有歌曲5)点击“播放选中的歌曲“，就开始播放 播放列表中的所有打勾的媒体文件</p>&nbsp;&nbsp;<a href='http://www.cnblogs.com/redleaf1995/archive/2008/04/21/1163896.html'>阅读全文</a><img src ="http://www.cnblogs.com/redleaf1995/aggbug/1163896.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/42120/" target="_blank">[新闻]中华英才网面临外资吞并</a>]]></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><wfw:comment>http://www.cnblogs.com/redleaf1995/comments/1159572.html</wfw:comment><comments>http://www.cnblogs.com/redleaf1995/archive/2008/04/18/1159572.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnblogs.com/redleaf1995/comments/commentRss/1159572.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/redleaf1995/services/trackbacks/1159572.html</trackback:ping><description><![CDATA[摘要: <p><img src="http://www.cnblogs.com/images/cnblogs_com/redleaf1995/131374/r_r_js.png" align="right"/>web开发和windows开发最大的区别就是windows开发是有状态的,而web开发是无状态的,在windows中,一切操作都可以由程序来控制 ,除非强制执行ctrl+alt+del;但web操作就不一样了,即使执行很重要的操作,用户一点击浏览器关闭按钮,就将前面操作成果化为乌有.尽管可以在onunload事件中加些代码,让用户可以选择是否退出,但不能从根本上解决问题!        前几天,从网上看到setCapture方法,了解了一下,大体是这样的意思,当在IE文档某个区域中使用了这个方法,并且写了onclick或者 onmouse***等有关的鼠标事件方法,那么它就会监视相应的鼠标操作,即使你的鼠标移出了IE,它也一样能捕获到.如果你在某div中的 onclick事件中写了一个alert命令,这时,你点击的关闭按钮,它也一样会弹出alert窗口.releaseCapture与 s&nbsp;&nbsp;<a href='http://www.cnblogs.com/redleaf1995/archive/2008/04/18/1159572.html'>阅读全文</a><img src ="http://www.cnblogs.com/redleaf1995/aggbug/1159572.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/42119/" target="_blank">[新闻]软件收入百强张榜 华为中兴海尔列前三</a>]]></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><wfw:comment>http://www.cnblogs.com/redleaf1995/comments/1157709.html</wfw:comment><comments>http://www.cnblogs.com/redleaf1995/archive/2008/04/17/1157709.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://www.cnblogs.com/redleaf1995/comments/commentRss/1157709.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/redleaf1995/services/trackbacks/1157709.html</trackback:ping><description><![CDATA[摘要: <p><img src="http://www.cnblogs.com/images/cnblogs_com/redleaf1995/131374/r_r_js.png" align="right"/>前面的文章探讨了使用javascript来操纵HTML元素的自定义属性，那么在HTML页面中，除了系统支持的HTML元素外，是否可以建立自定义的HTML元素呢？答案是可以的。自定义的HTML元素与系统自身的HTML元素地位相同，都可以用document.getElementById来获得，区别在于，自定义的HTML元素都是不可见的，类似于隐藏控件。使用自定义HTML元素，我们就可以建立多种隐藏控件，而不一定拘泥于只能建立input的hidden元素了；另外，还可以用于某些特定方面的需求！</p>&nbsp;&nbsp;<a href='http://www.cnblogs.com/redleaf1995/archive/2008/04/17/1157709.html'>阅读全文</a><img src ="http://www.cnblogs.com/redleaf1995/aggbug/1157709.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/42117/" target="_blank">[新闻]马云vs孙正义：两个“疯子”的对话</a>]]></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><wfw:comment>http://www.cnblogs.com/redleaf1995/comments/1155761.html</wfw:comment><comments>http://www.cnblogs.com/redleaf1995/archive/2008/04/16/1155761.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnblogs.com/redleaf1995/comments/commentRss/1155761.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/redleaf1995/services/trackbacks/1155761.html</trackback:ping><description><![CDATA[摘要: <p><img src="http://www.cnblogs.com/images/cnblogs_com/redleaf1995/131374/r_r_js.png" align="right"/>因工作需要，需使用javascript来操作HTML在线编辑器，在网上搜了许多，都是与服务器端相结合的，通过表单提交的方式来处理的。没办法，只好在此基础上对其进行更新！ <br />参考的myeditor控件不知是哪位高人写的。在此表示感谢！<br />首先，定义一全局变量，用于向HtmlEditor传递值：</p>&nbsp;&nbsp;<a href='http://www.cnblogs.com/redleaf1995/archive/2008/04/16/1155761.html'>阅读全文</a><img src ="http://www.cnblogs.com/redleaf1995/aggbug/1155761.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/42116/" target="_blank">[新闻]消息称MySQL创始人已向Sun提交辞呈</a>]]></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><wfw:comment>http://www.cnblogs.com/redleaf1995/comments/1154152.html</wfw:comment><comments>http://www.cnblogs.com/redleaf1995/archive/2008/04/15/1154152.html#Feedback</comments><slash:comments>5</slash:comments><wfw:commentRss>http://www.cnblogs.com/redleaf1995/comments/commentRss/1154152.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/redleaf1995/services/trackbacks/1154152.html</trackback:ping><description><![CDATA[摘要: <p><img src="http://www.cnblogs.com/images/cnblogs_com/redleaf1995/131374/r_r_js.png" align="right"/>在WEB应用程序中，经常需要将数据从数据库中取出来，填充到HTML控件中，然后再存回数据库。如果数据并未改动，仍然占用网络资源存入数据库，则对网络资源是一种浪费，当页面数据很多和网络访问量很大时，就会形成性能的瓶颈。如何能在提交数据前进行判断呢？一种方法是建隐藏控件或定义全局变量，这种情况适用于控件很少时，若一个表单页面有数十项时，建隐藏控件太多反而降低性能，定义全局变量不容易记忆。另一种方法，就是在原有控件中增加自定义属性，这样，既能避免逻辑复杂，又能节省网络流量。</p>&nbsp;&nbsp;<a href='http://www.cnblogs.com/redleaf1995/archive/2008/04/15/1154152.html'>阅读全文</a><img src ="http://www.cnblogs.com/redleaf1995/aggbug/1154152.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/42115/" target="_blank">[新闻]谷歌Chrome浏览器即将更换LOGO颜色？</a>]]></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><wfw:comment>http://www.cnblogs.com/redleaf1995/comments/1152317.html</wfw:comment><comments>http://www.cnblogs.com/redleaf1995/archive/2008/04/14/1152317.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnblogs.com/redleaf1995/comments/commentRss/1152317.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/redleaf1995/services/trackbacks/1152317.html</trackback:ping><description><![CDATA[<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" /><br><br><a href="http://news.cnblogs.com/n/42101/" target="_blank">[新闻]淘宝网合并阿里妈妈 专家称阿里巴巴或有新战略</a>]]></description></item><item><title>使用javascript操纵HTML元素的自定义属性</title><link>http://www.cnblogs.com/redleaf1995/archive/2008/04/11/1148446.html</link><dc:creator>红色枫叶</dc:creator><author>红色枫叶</author><pubDate>Fri, 11 Apr 2008 07:44:00 GMT</pubDate><guid>http://www.cnblogs.com/redleaf1995/archive/2008/04/11/1148446.html</guid><wfw:comment>http://www.cnblogs.com/redleaf1995/comments/1148446.html</wfw:comment><comments>http://www.cnblogs.com/redleaf1995/archive/2008/04/11/1148446.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnblogs.com/redleaf1995/comments/commentRss/1148446.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/redleaf1995/services/trackbacks/1148446.html</trackback:ping><description><![CDATA[<p style="margin: 0cm 0cm 0pt;"><font size="3"><span style="font-family: 宋体;">为</span><font face="Times New Roman">HTML</font><span style="font-family: 宋体;">元素添加一自定义的属性非常方便，只须将其加到尖括号中即可，与内置属性地位相等。</span></font></p>
<p style="margin: 0cm 0cm 0pt;"><font size="3"><span style="font-family: 宋体;">如我们要为</span><font face="Times New Roman">TextBox</font><span style="font-family: 宋体;">元素添加属性</span><font face="Times New Roman">idvalue</font><span style="font-family: 宋体;">：</span></font></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 alt="" src="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);">="txtInput"</span><span style="color: rgb(255, 0, 0);">&nbsp;name</span><span style="color: rgb(0, 0, 255);">="txtInput"</span><span style="color: rgb(255, 0, 0);">&nbsp;value</span><span style="color: rgb(0, 0, 255);">="自定义文本"</span><span style="color: rgb(0, 0, 255);">&gt;</span></div>
</div>
<span style="font-size: 10.5pt; font-family: 宋体;">只须在原来的控件后面加上：</span><span style="font-size: 10.5pt; font-family: &quot;Times New Roman&quot;;">idvalue=&#8221;&#8230;&#8221;,</span><span style="font-size: 10.5pt; font-family: 宋体;">成为</span><span style="font-size: 10.5pt; font-family: &quot;Times New Roman&quot;;">:
<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" 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);">="txtInput"</span><span style="color: rgb(255, 0, 0);">&nbsp;name</span><span style="color: rgb(0, 0, 255);">="txtInput"</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;idvalue</span><span style="color: rgb(0, 0, 255);">="自定义值"</span><span style="color: rgb(0, 0, 255);">&gt;</span></div>
</div>
<br />
<p style="margin: 0cm 0cm 0pt;">idvalue<span style="font-family: 宋体;">即可正式成为</span>txtInput<span style="font-family: 宋体;">的属性，地位与其他属性相等。</span></p>
<p><span style="font-family: 宋体;">如以下例子，在</span>IE6<span style="font-size: 10.5pt; font-family: 宋体;">中调试通过：</span></p>
</span>
<div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br />
<br />
Code highlighting produced by Actipro CodeHighlighter (freeware)<br />
http://www.CodeHighlighter.com/<br />
<br />
--><img src="http://www.cnblogs.com/images/OutliningIndicators/None.gif" alt="" 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 src="http://www.cnblogs.com/images/OutliningIndicators/None.gif" alt="" 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 src="http://www.cnblogs.com/images/OutliningIndicators/None.gif" alt="" 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 id="Codehighlighter1_73_348_Open_Image" src="http://www.cnblogs.com/images/OutliningIndicators/ExpandedBlockStart.gif" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_73_348_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_73_348_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_73_348_Closed_Text').style.display='inline';" alt="" align="top" /><img id="Codehighlighter1_73_348_Closed_Image" src="http://www.cnblogs.com/images/OutliningIndicators/ContractedBlock.gif" style="display: none;" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_73_348_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_73_348_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_73_348_Open_Text').style.display='inline';" alt="" 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="Codehighlighter1_73_348_Closed_Text" style="border: 1px solid rgb(128, 128, 128); background-color: rgb(255, 255, 255); display: none;"><img src="http://www.cnblogs.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_73_348_Open_Text"><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"><br />
<img src="http://www.cnblogs.com/images/OutliningIndicators/InBlock.gif" alt="" 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);">function</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;showText()<br />
<img id="Codehighlighter1_118_199_Open_Image" src="http://www.cnblogs.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_118_199_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_118_199_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_118_199_Closed_Text').style.display='inline';" alt="" align="top" /><img id="Codehighlighter1_118_199_Closed_Image" src="http://www.cnblogs.com/images/OutliningIndicators/ContractedSubBlock.gif" style="display: none;" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_118_199_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_118_199_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_118_199_Open_Text').style.display='inline';" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_118_199_Closed_Text" style="border: 1px solid rgb(128, 128, 128); background-color: rgb(255, 255, 255); display: none;"><img src="http://www.cnblogs.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_118_199_Open_Text"><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">{<br />
<img src="http://www.cnblogs.com/images/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: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">txtInput</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);">).value);<br />
<img src="http://www.cnblogs.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" 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 src="http://www.cnblogs.com/images/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img src="http://www.cnblogs.com/images/OutliningIndicators/InBlock.gif" alt="" 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);">function</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;showValue()<br />
<img id="Codehighlighter1_258_341_Open_Image" src="http://www.cnblogs.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_258_341_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_258_341_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_258_341_Closed_Text').style.display='inline';" alt="" align="top" /><img id="Codehighlighter1_258_341_Closed_Image" src="http://www.cnblogs.com/images/OutliningIndicators/ContractedSubBlock.gif" style="display: none;" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_258_341_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_258_341_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_258_341_Open_Text').style.display='inline';" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_258_341_Closed_Text" style="border: 1px solid rgb(128, 128, 128); background-color: rgb(255, 255, 255); display: none;"><img src="http://www.cnblogs.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_258_341_Open_Text"><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">{<br />
<img src="http://www.cnblogs.com/images/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: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">txtInput</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);">).idvalue);<br />
<img src="http://www.cnblogs.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" 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 src="http://www.cnblogs.com/images/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;<br />
<img src="http://www.cnblogs.com/images/OutliningIndicators/ExpandedBlockEnd.gif" alt="" 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 src="http://www.cnblogs.com/images/OutliningIndicators/None.gif" alt="" 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 src="http://www.cnblogs.com/images/OutliningIndicators/None.gif" alt="" 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 src="http://www.cnblogs.com/images/OutliningIndicators/None.gif" alt="" 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);">="txtInput"</span><span style="color: rgb(255, 0, 0);">&nbsp;name</span><span style="color: rgb(0, 0, 255);">="txtInput"</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;idvalue</span><span style="color: rgb(0, 0, 255);">="自定义值"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br />
<img src="http://www.cnblogs.com/images/OutliningIndicators/None.gif" alt="" 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;id</span><span style="color: rgb(0, 0, 255);">="btnShowText"</span><span style="color: rgb(255, 0, 0);">&nbsp;name</span><span style="color: rgb(0, 0, 255);">="btnShowText"</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);">="showText();"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br />
<img src="http://www.cnblogs.com/images/OutliningIndicators/None.gif" alt="" 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;id</span><span style="color: rgb(0, 0, 255);">="btnShowValue"</span><span style="color: rgb(255, 0, 0);">&nbsp;name</span><span style="color: rgb(0, 0, 255);">="btnShowValue"</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);">="showValue();"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br />
<img src="http://www.cnblogs.com/images/OutliningIndicators/None.gif" alt="" 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 src="http://www.cnblogs.com/images/OutliningIndicators/None.gif" alt="" 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>
<span style="font-size: 10.5pt; font-family: &quot;Times New Roman&quot;;">
<p><span style="font-size: 10.5pt; font-family: 宋体;">但</span><span style="font-size: 10.5pt; font-family: &quot;Times New Roman&quot;;">idvalue</span><span style="font-size: 10.5pt; font-family: 宋体;">在</span><span style="font-size: 10.5pt; font-family: &quot;Times New Roman&quot;;">Firefox</span><span style="font-size: 10.5pt; font-family: 宋体;">中却不能通过，主要是因为</span><span style="font-size: 10.5pt; font-family: &quot;Times New Roman&quot;;">Firefox</span><span style="font-size: 10.5pt; font-family: 宋体;">控制严格，所以这些自定义属性不能认识。经过调试，只能用</span><span style="font-size: 10.5pt; font-family: &quot;Times New Roman&quot;;">document.getElementById("txtInput").attributes["idvalue"].nodeValue</span><span style="font-size: 10.5pt; font-family: 宋体;">取得，该方法在</span><span style="font-size: 10.5pt; font-family: &quot;Times New Roman&quot;;">IE</span><span style="font-size: 10.5pt; font-family: 宋体;">中也可使用。所以，同时适用</span><span style="font-size: 10.5pt; font-family: &quot;Times New Roman&quot;;">IE</span><span style="font-size: 10.5pt; font-family: 宋体;">和</span><span style="font-size: 10.5pt; font-family: &quot;Times New Roman&quot;;">Firefox</span><span style="font-size: 10.5pt; font-family: 宋体;">的代码为：</span></p>
</span>
<div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br />
<br />
Code highlighting produced by Actipro CodeHighlighter (freeware)<br />
http://www.CodeHighlighter.com/<br />
<br />
--><img src="http://www.cnblogs.com/images/OutliningIndicators/None.gif" alt="" 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 src="http://www.cnblogs.com/images/OutliningIndicators/None.gif" alt="" 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 src="http://www.cnblogs.com/images/OutliningIndicators/None.gif" alt="" 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 id="Codehighlighter1_73_372_Open_Image" src="http://www.cnblogs.com/images/OutliningIndicators/ExpandedBlockStart.gif" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_73_372_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_73_372_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_73_372_Closed_Text').style.display='inline';" alt="" align="top" /><img id="Codehighlighter1_73_372_Closed_Image" src="http://www.cnblogs.com/images/OutliningIndicators/ContractedBlock.gif" style="display: none;" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_73_372_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_73_372_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_73_372_Open_Text').style.display='inline';" alt="" 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="Codehighlighter1_73_372_Closed_Text" style="border: 1px solid rgb(128, 128, 128); background-color: rgb(255, 255, 255); display: none;"><img src="http://www.cnblogs.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_73_372_Open_Text"><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"><br />
<img src="http://www.cnblogs.com/images/OutliningIndicators/InBlock.gif" alt="" 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);">function</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;showText()<br />
<img id="Codehighlighter1_118_199_Open_Image" src="http://www.cnblogs.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_118_199_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_118_199_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_118_199_Closed_Text').style.display='inline';" alt="" align="top" /><img id="Codehighlighter1_118_199_Closed_Image" src="http://www.cnblogs.com/images/OutliningIndicators/ContractedSubBlock.gif" style="display: none;" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_118_199_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_118_199_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_118_199_Open_Text').style.display='inline';" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_118_199_Closed_Text" style="border: 1px solid rgb(128, 128, 128); background-color: rgb(255, 255, 255); display: none;"><img src="http://www.cnblogs.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_118_199_Open_Text"><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">{<br />
<img src="http://www.cnblogs.com/images/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: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">txtInput</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);">).value);<br />
<img src="http://www.cnblogs.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" 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 src="http://www.cnblogs.com/images/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
<img src="http://www.cnblogs.com/images/OutliningIndicators/InBlock.gif" alt="" 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);">function</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;showValue()<br />
<img id="Codehighlighter1_258_365_Open_Image" src="http://www.cnblogs.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_258_365_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_258_365_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_258_365_Closed_Text').style.display='inline';" alt="" align="top" /><img id="Codehighlighter1_258_365_Closed_Image" src="http://www.cnblogs.com/images/OutliningIndicators/ContractedSubBlock.gif" style="display: none;" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_258_365_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_258_365_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_258_365_Open_Text').style.display='inline';" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_258_365_Closed_Text" style="border: 1px solid rgb(128, 128, 128); background-color: rgb(255, 255, 255); display: none;"><img src="http://www.cnblogs.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_258_365_Open_Text"><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">{<br />
<img src="http://www.cnblogs.com/images/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: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">txtInput</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);">).attributes[</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);">idvalue</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);">].nodeValue);<br />
<img src="http://www.cnblogs.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" 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 src="http://www.cnblogs.com/images/OutliningIndicators/InBlock.gif" alt="" align="top" />&nbsp;<br />
<img src="http://www.cnblogs.com/images/OutliningIndicators/ExpandedBlockEnd.gif" alt="" 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 src="http://www.cnblogs.com/images/OutliningIndicators/None.gif" alt="" 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 src="http://www.cnblogs.com/images/OutliningIndicators/None.gif" alt="" 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 src="http://www.cnblogs.com/images/OutliningIndicators/None.gif" alt="" 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);">="txtInput"</span><span style="color: rgb(255, 0, 0);">&nbsp;name</span><span style="color: rgb(0, 0, 255);">="txtInput"</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;idvalue</span><span style="color: rgb(0, 0, 255);">="自定义值"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br />
<img src="http://www.cnblogs.com/images/OutliningIndicators/None.gif" alt="" 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;id</span><span style="color: rgb(0, 0, 255);">="btnShowText"</span><span style="color: rgb(255, 0, 0);">&nbsp;name</span><span style="color: rgb(0, 0, 255);">="btnShowText"</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);">="showText();"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br />
<img src="http://www.cnblogs.com/images/OutliningIndicators/None.gif" alt="" 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;id</span><span style="color: rgb(0, 0, 255);">="btnShowValue"</span><span style="color: rgb(255, 0, 0);">&nbsp;name</span><span style="color: rgb(0, 0, 255);">="btnShowValue"</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);">="showValue();"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br />
<img src="http://www.cnblogs.com/images/OutliningIndicators/None.gif" alt="" 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 src="http://www.cnblogs.com/images/OutliningIndicators/None.gif" alt="" 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>
<br />
源代码: <a title="点击下载" target="_blank" href="http://www.cnblogs.com/Files/redleaf1995/testcustom.rar"></a><a title="点击下载" target="_blank" href="http://www.cnblogs.com/Files/redleaf1995/testHistory.rar"></a><a title="点击下载" target="_blank" href="http://www.cnblogs.com/Files/redleaf1995/testcustom.rar">http://www.cnblogs.com/Files/redleaf1995/testcustom.rar</a><a title="点击下载" target="_blank" href="http://www.cnblogs.com/Files/redleaf1995/testHistory.rar"></a><a target=""></a><a target=""></a>
<img src ="http://www.cnblogs.com/redleaf1995/aggbug/1148446.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/42096/" target="_blank">[新闻]微软研究院发布 AutoCollage - 整理并融合照片</a>]]></description></item><item><title>Firefox解析CDATA的问题</title><link>http://www.cnblogs.com/redleaf1995/archive/2008/04/11/1148388.html</link><dc:creator>红色枫叶</dc:creator><author>红色枫叶</author><pubDate>Fri, 11 Apr 2008 07:36:00 GMT</pubDate><guid>http://www.cnblogs.com/redleaf1995/archive/2008/04/11/1148388.html</guid><wfw:comment>http://www.cnblogs.com/redleaf1995/comments/1148388.html</wfw:comment><comments>http://www.cnblogs.com/redleaf1995/archive/2008/04/11/1148388.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnblogs.com/redleaf1995/comments/commentRss/1148388.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/redleaf1995/services/trackbacks/1148388.html</trackback:ping><description><![CDATA[<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><font size="3"><span style="font-family: 宋体;">这段</span><font face="Times New Roman">xml</font><span style="font-family: 宋体;">语句，在</span><font face="Times New Roman">IE</font><span style="font-family: 宋体;">中通过，并能显示出内容，但在F</span><font face="Times New Roman">irefox</font><span style="font-family: 宋体;">中不提示出错，却在网页怎么也显示不出内容：</span></font></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" alt="" align="top" /><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">text</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: rgb(0, 0, 255);">&lt;![CDATA[</span><span style="color: rgb(128, 128, 128);"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&lt;div&nbsp;id="divShowContainer"&gt;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div&nbsp;id="divShow"&nbsp;&gt;<br />
<img src="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;&lt;
input&nbsp;id="btnAddNew"&nbsp;onclick="SearchService('w_WebService');"&nbsp;type="button"&nbsp;value
="添&nbsp;加"&nbsp;class="forWinButton"&nbsp;name="btnAddNew"&gt;<br />
<img src="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;&#8230;.&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/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;&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/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">]]&gt;</span><span style="color: rgb(0, 0, 0);"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">text</span><span style="color: rgb(0, 0, 255);">&gt;</span></div>
</div>
<span style="font-size: 10.5pt; font-family: 宋体;">调试的最后结果，竟然是</span><span style="font-size: 10.5pt; font-family: &quot;Times New Roman&quot;;">&lt;text&gt;&lt;![CDATA[</span><span style="font-size: 10.5pt; font-family: 宋体;">这两个必须放在同一行上，否则就会出现问题：
<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" alt="" align="top" /><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">text</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 255);">&lt;![CDATA[</span><span style="color: rgb(128, 128, 128);"><br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&lt;div&nbsp;id="divShowContainer"&gt;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div&nbsp;id="divShow"&nbsp;&gt;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;
input&nbsp;id="btnAddNew"&nbsp;onclick="SearchService('w_WebService');"&nbsp;type="button"&nbsp;value
="添&nbsp;加"&nbsp;class="forWinButton"&nbsp;name="btnAddNew"&gt;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8230;.&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/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;<br />
<img src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" alt="" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;&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/None.gif" alt="" align="top" /></span><span style="color: rgb(0, 0, 255);">]]&gt;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">text</span><span style="color: rgb(0, 0, 255);">&gt;</span></div>
</div>
</span>&nbsp;<font size="3"><span style="font-family: 宋体;">估计</span><font face="Times New Roman">Firefox</font><span style="font-family: 宋体;">不能识别开头的</span><font face="Times New Roman">&lt;![CDATA[</font><span style="font-family: 宋体;">结点。</span></font>
<img src ="http://www.cnblogs.com/redleaf1995/aggbug/1148388.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/42096/" target="_blank">[新闻]微软研究院发布 AutoCollage - 整理并融合照片</a>]]></description></item></channel></rss>