﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>IT博客-KiMoGiGi 技术文集-随笔分类-Web小技巧</title><link>http://www.cnitblog.com/seeyeah/category/3171.html</link><description>不在乎选择什么，而在乎坚持多久……</description><language>zh-cn</language><lastBuildDate>Tue, 27 Sep 2011 04:09:49 GMT</lastBuildDate><pubDate>Tue, 27 Sep 2011 04:09:49 GMT</pubDate><ttl>60</ttl><item><title>【原】Json对象格式化字符串输出</title><link>http://www.cnitblog.com/seeyeah/archive/2009/09/29/61618.html</link><dc:creator>KiMoGiGi</dc:creator><author>KiMoGiGi</author><pubDate>Mon, 28 Sep 2009 16:44:00 GMT</pubDate><guid>http://www.cnitblog.com/seeyeah/archive/2009/09/29/61618.html</guid><wfw:comment>http://www.cnitblog.com/seeyeah/comments/61618.html</wfw:comment><comments>http://www.cnitblog.com/seeyeah/archive/2009/09/29/61618.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/seeyeah/comments/commentRss/61618.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/seeyeah/services/trackbacks/61618.html</trackback:ping><description><![CDATA[函数的主要功能是：传入一个Json对象（为了节省空间，一般请求返回的Json都是没有格式化的，可读性不好），可以输出格式化字符串，提高Json可读性。<br>虽然很多IDE或工具已经实现，但有时做简单测试时，格式化还是需要的。<br><br>假设，JS调用（假设界面有一个id为result的textarea）<br>
<div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; background-color: #eeeeee; font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: #0000ff;">var</span><span style="color: #000000;">&nbsp;json&nbsp;</span><span style="color: #000000;">=</span><span style="color: #000000;">&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;Id:&nbsp;</span><span style="color: #000000;">1</span><span style="color: #000000;">,<br>&nbsp;&nbsp;&nbsp;&nbsp;Name:&nbsp;</span><span style="color: #000000;">"</span><span style="color: #000000;">Test</span><span style="color: #000000;">"</span><span style="color: #000000;">,<br>&nbsp;&nbsp;&nbsp;&nbsp;Date:&nbsp;</span><span style="color: #0000ff;">new</span><span style="color: #000000;">&nbsp;Date(),<br>&nbsp;&nbsp;&nbsp;&nbsp;Subjects:<br>&nbsp;&nbsp;&nbsp;&nbsp;[<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Name:&nbsp;</span><span style="color: #000000;">"</span><span style="color: #000000;">语文</span><span style="color: #000000;">"</span><span style="color: #000000;"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Name:&nbsp;</span><span style="color: #000000;">"</span><span style="color: #000000;">数学</span><span style="color: #000000;">"</span><span style="color: #000000;"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Name:&nbsp;</span><span style="color: #000000;">"</span><span style="color: #000000;">英语</span><span style="color: #000000;">"</span><span style="color: #000000;">,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Marks:&nbsp;[</span><span style="color: #000000;">90</span><span style="color: #000000;">,&nbsp;</span><span style="color: #000000;">100</span><span style="color: #000000;">,&nbsp;</span><span style="color: #000000;">83</span><span style="color: #000000;">,&nbsp;{&nbsp;Test:&nbsp;</span><span style="color: #000000;">"</span><span style="color: #000000;">aaa</span><span style="color: #000000;">"</span><span style="color: #000000;">}]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;],<br>&nbsp;&nbsp;&nbsp;&nbsp;Company:<br>&nbsp;&nbsp;&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Name:&nbsp;</span><span style="color: #000000;">"</span><span style="color: #000000;">Microsoft</span><span style="color: #000000;">"</span><span style="color: #000000;">,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Location:&nbsp;</span><span style="color: #000000;">"</span><span style="color: #000000;">USA</span><span style="color: #000000;">"</span><span style="color: #000000;"><br>&nbsp;&nbsp;&nbsp;&nbsp;},<br>&nbsp;&nbsp;&nbsp;&nbsp;Test:&nbsp;</span><span style="color: #0000ff;">null</span><span style="color: #000000;"><br>};<br></span><span style="color: #008000;">//</span><span style="color: #008000;">-------------测试</span><span style="color: #008000;"><br>//</span><span style="color: #008000;">格式化Json字符串</span><span style="color: #008000;"><br></span><span style="color: #000000;">document.getElementById(</span><span style="color: #000000;">"</span><span style="color: #000000;">result</span><span style="color: #000000;">"</span><span style="color: #000000;">).value&nbsp;</span><span style="color: #000000;">=</span><span style="color: #000000;">&nbsp;JsonUti.convertToString(json);<br></span></div>
<br>界面输出<br><br><img alt="" src="http://www.cnitblog.com/images/cnitblog_com/seeyeah/s1.jpg"><br>实现代码如下:<br>
<div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; background-color: #eeeeee; font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">var</span><span style="color: #000000;">&nbsp;JsonUti&nbsp;</span><span style="color: #000000;">=</span><span style="color: #000000;">&nbsp;{<br>&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></span><span style="color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;n:&nbsp;</span><span style="color: #000000;">"</span><span style="color: #000000;">\n</span><span style="color: #000000;">"</span><span style="color: #000000;">,<br>&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></span><span style="color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;t:&nbsp;</span><span style="color: #000000;">"</span><span style="color: #000000;">\t</span><span style="color: #000000;">"</span><span style="color: #000000;">,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #008000;">//</span><span style="color: #008000;">转换String</span><span style="color: #008000;"><br></span><span style="color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;convertToString:&nbsp;</span><span style="color: #0000ff;">function</span><span style="color: #000000;">(obj)&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">return</span><span style="color: #000000;">&nbsp;JsonUti.__writeObj(obj,&nbsp;</span><span style="color: #000000;">1</span><span style="color: #000000;">);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #008000;">//</span><span style="color: #008000;">写对象</span><span style="color: #008000;"><br></span><span style="color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__writeObj:&nbsp;</span><span style="color: #0000ff;">function</span><span style="color: #000000;">(obj&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #008000;">//</span><span style="color: #008000;">对象</span><span style="color: #008000;"><br></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;level&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #008000;">//</span><span style="color: #008000;">层次（基数为1）</span><span style="color: #008000;"><br></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;isInArray)&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #008000;">//</span><span style="color: #008000;">此对象是否在一个集合内</span><span style="color: #008000;"><br></span><span style="color: #000000;">&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;">如果为空，直接输出null</span><span style="color: #008000;"><br></span><span style="color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">if</span><span style="color: #000000;">&nbsp;(obj&nbsp;</span><span style="color: #000000;">==</span><span style="color: #000000;">&nbsp;</span><span style="color: #0000ff;">null</span><span style="color: #000000;">)&nbsp;{<br>&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;">return</span><span style="color: #000000;">&nbsp;</span><span style="color: #000000;">"</span><span style="color: #000000;">null</span><span style="color: #000000;">"</span><span style="color: #000000;">;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #008000;">//</span><span style="color: #008000;">为普通类型，直接输出值</span><span style="color: #008000;"><br></span><span style="color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">if</span><span style="color: #000000;">&nbsp;(obj.constructor&nbsp;</span><span style="color: #000000;">==</span><span style="color: #000000;">&nbsp;Number&nbsp;</span><span style="color: #000000;">||</span><span style="color: #000000;">&nbsp;obj.constructor&nbsp;</span><span style="color: #000000;">==</span><span style="color: #000000;">&nbsp;Date&nbsp;</span><span style="color: #000000;">||</span><span style="color: #000000;">&nbsp;obj.constructor&nbsp;</span><span style="color: #000000;">==</span><span style="color: #000000;">&nbsp;String&nbsp;</span><span style="color: #000000;">||</span><span style="color: #000000;">&nbsp;obj.constructor&nbsp;</span><span style="color: #000000;">==</span><span style="color: #000000;">&nbsp;Boolean)&nbsp;{<br>&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;">var</span><span style="color: #000000;">&nbsp;v&nbsp;</span><span style="color: #000000;">=</span><span style="color: #000000;">&nbsp;obj.toString();<br>&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;">var</span><span style="color: #000000;">&nbsp;tab&nbsp;</span><span style="color: #000000;">=</span><span style="color: #000000;">&nbsp;isInArray&nbsp;</span><span style="color: #000000;">?</span><span style="color: #000000;">&nbsp;JsonUti.__repeatStr(JsonUti.t,&nbsp;level&nbsp;</span><span style="color: #000000;">-</span><span style="color: #000000;">&nbsp;</span><span style="color: #000000;">1</span><span style="color: #000000;">)&nbsp;:&nbsp;</span><span style="color: #000000;">""</span><span style="color: #000000;">;<br>&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;">if</span><span style="color: #000000;">&nbsp;(obj.constructor&nbsp;</span><span style="color: #000000;">==</span><span style="color: #000000;">&nbsp;String&nbsp;</span><span style="color: #000000;">||</span><span style="color: #000000;">&nbsp;obj.constructor&nbsp;</span><span style="color: #000000;">==</span><span style="color: #000000;">&nbsp;Date)&nbsp;{<br>&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;">时间格式化只是单纯输出字符串，而不是Date对象</span><span style="color: #008000;"><br></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: #0000ff;">return</span><span style="color: #000000;">&nbsp;tab&nbsp;</span><span style="color: #000000;">+</span><span style="color: #000000;">&nbsp;(</span><span style="color: #000000;">"</span><span style="color: #000000;">\</span><span style="color: #000000;">""</span><span style="color: #000000;">&nbsp;+&nbsp;v&nbsp;+&nbsp;</span><span style="color: #000000;">"</span><span style="color: #000000;">\</span><span style="color: #000000;">""</span><span style="color: #000000;">);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">else</span><span style="color: #000000;">&nbsp;</span><span style="color: #0000ff;">if</span><span style="color: #000000;">&nbsp;(obj.constructor&nbsp;</span><span style="color: #000000;">==</span><span style="color: #000000;">&nbsp;Boolean)&nbsp;{<br>&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: #0000ff;">return</span><span style="color: #000000;">&nbsp;tab&nbsp;</span><span style="color: #000000;">+</span><span style="color: #000000;">&nbsp;v.toLowerCase();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">else</span><span style="color: #000000;">&nbsp;{<br>&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: #0000ff;">return</span><span style="color: #000000;">&nbsp;tab&nbsp;</span><span style="color: #000000;">+</span><span style="color: #000000;">&nbsp;(v);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;<br>&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;">写Json对象，缓存字符串</span><span style="color: #008000;"><br></span><span style="color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">var</span><span style="color: #000000;">&nbsp;currentObjStrings&nbsp;</span><span style="color: #000000;">=</span><span style="color: #000000;">&nbsp;[];<br>&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></span><span style="color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">for</span><span style="color: #000000;">&nbsp;(</span><span style="color: #0000ff;">var</span><span style="color: #000000;">&nbsp;name&nbsp;</span><span style="color: #0000ff;">in</span><span style="color: #000000;">&nbsp;obj)&nbsp;{<br>&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;">var</span><span style="color: #000000;">&nbsp;temp&nbsp;</span><span style="color: #000000;">=</span><span style="color: #000000;">&nbsp;[];<br>&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;">格式化Tab</span><span style="color: #008000;"><br></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;</span><span style="color: #0000ff;">var</span><span style="color: #000000;">&nbsp;paddingTab&nbsp;</span><span style="color: #000000;">=</span><span style="color: #000000;">&nbsp;JsonUti.__repeatStr(JsonUti.t,&nbsp;level);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;temp.push(paddingTab);<br>&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></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;temp.push(name&nbsp;</span><span style="color: #000000;">+</span><span style="color: #000000;">&nbsp;</span><span style="color: #000000;">"</span><span style="color: #000000;">&nbsp;:&nbsp;</span><span style="color: #000000;">"</span><span style="color: #000000;">);<br>&nbsp;<br>&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;">var</span><span style="color: #000000;">&nbsp;val&nbsp;</span><span style="color: #000000;">=</span><span style="color: #000000;">&nbsp;obj[name];<br>&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;">if</span><span style="color: #000000;">&nbsp;(val&nbsp;</span><span style="color: #000000;">==</span><span style="color: #000000;">&nbsp;</span><span style="color: #0000ff;">null</span><span style="color: #000000;">)&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;temp.push(</span><span style="color: #000000;">"</span><span style="color: #000000;">null</span><span style="color: #000000;">"</span><span style="color: #000000;">);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">else</span><span style="color: #000000;">&nbsp;{<br>&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: #0000ff;">var</span><span style="color: #000000;">&nbsp;c&nbsp;</span><span style="color: #000000;">=</span><span style="color: #000000;">&nbsp;val.constructor;<br>&nbsp;<br>&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: #0000ff;">if</span><span style="color: #000000;">&nbsp;(c&nbsp;</span><span style="color: #000000;">==</span><span style="color: #000000;">&nbsp;Array)&nbsp;{&nbsp;</span><span style="color: #008000;">//</span><span style="color: #008000;">如果为集合，循环内部对象</span><span style="color: #008000;"><br></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;temp.push(JsonUti.n&nbsp;</span><span style="color: #000000;">+</span><span style="color: #000000;">&nbsp;paddingTab&nbsp;</span><span style="color: #000000;">+</span><span style="color: #000000;">&nbsp;</span><span style="color: #000000;">"</span><span style="color: #000000;">[</span><span style="color: #000000;">"</span><span style="color: #000000;">&nbsp;</span><span style="color: #000000;">+</span><span style="color: #000000;">&nbsp;JsonUti.n);<br>&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: #0000ff;">var</span><span style="color: #000000;">&nbsp;levelUp&nbsp;</span><span style="color: #000000;">=</span><span style="color: #000000;">&nbsp;level&nbsp;</span><span style="color: #000000;">+</span><span style="color: #000000;">&nbsp;</span><span style="color: #000000;">2</span><span style="color: #000000;">;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #008000;">//</span><span style="color: #008000;">层级+2</span><span style="color: #008000;"><br></span><span style="color: #000000;">&nbsp;<br>&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: #0000ff;">var</span><span style="color: #000000;">&nbsp;tempArrValue&nbsp;</span><span style="color: #000000;">=</span><span style="color: #000000;">&nbsp;[];&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #008000;">//</span><span style="color: #008000;">集合元素相关字符串缓存片段</span><span style="color: #008000;"><br></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;</span><span style="color: #0000ff;">for</span><span style="color: #000000;">&nbsp;(</span><span style="color: #0000ff;">var</span><span style="color: #000000;">&nbsp;i&nbsp;</span><span style="color: #000000;">=</span><span style="color: #000000;">&nbsp;</span><span style="color: #000000;">0</span><span style="color: #000000;">;&nbsp;i&nbsp;</span><span style="color: #000000;">&lt;</span><span style="color: #000000;">&nbsp;val.length;&nbsp;i</span><span style="color: #000000;">++</span><span style="color: #000000;">)&nbsp;{<br>&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;">递归写对象&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;"><br></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;tempArrValue.push(JsonUti.__writeObj(val[i],&nbsp;levelUp,&nbsp;</span><span style="color: #0000ff;">true</span><span style="color: #000000;">));<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;<br>&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;temp.push(tempArrValue.join(</span><span style="color: #000000;">"</span><span style="color: #000000;">,</span><span style="color: #000000;">"</span><span style="color: #000000;">&nbsp;</span><span style="color: #000000;">+</span><span style="color: #000000;">&nbsp;JsonUti.n));<br>&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;temp.push(JsonUti.n&nbsp;</span><span style="color: #000000;">+</span><span style="color: #000000;">&nbsp;paddingTab&nbsp;</span><span style="color: #000000;">+</span><span style="color: #000000;">&nbsp;</span><span style="color: #000000;">"</span><span style="color: #000000;">]</span><span style="color: #000000;">"</span><span style="color: #000000;">);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&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: #0000ff;">else</span><span style="color: #000000;">&nbsp;</span><span style="color: #0000ff;">if</span><span style="color: #000000;">&nbsp;(c&nbsp;</span><span style="color: #000000;">==</span><span style="color: #000000;">&nbsp;Function)&nbsp;{<br>&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;temp.push(</span><span style="color: #000000;">"</span><span style="color: #000000;">[Function]</span><span style="color: #000000;">"</span><span style="color: #000000;">);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&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: #0000ff;">else</span><span style="color: #000000;">&nbsp;{<br>&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></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;temp.push(JsonUti.__writeObj(val,&nbsp;level&nbsp;</span><span style="color: #000000;">+</span><span style="color: #000000;">&nbsp;</span><span style="color: #000000;">1</span><span style="color: #000000;">));<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #008000;">//</span><span style="color: #008000;">加入当前对象&#8220;属性&#8221;字符串</span><span style="color: #008000;"><br></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;currentObjStrings.push(temp.join(</span><span style="color: #000000;">""</span><span style="color: #000000;">));<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">return</span><span style="color: #000000;">&nbsp;(level&nbsp;</span><span style="color: #000000;">&gt;</span><span style="color: #000000;">&nbsp;</span><span style="color: #000000;">1</span><span style="color: #000000;">&nbsp;</span><span style="color: #000000;">&amp;&amp;</span><span style="color: #000000;">&nbsp;</span><span style="color: #000000;">!</span><span style="color: #000000;">isInArray&nbsp;</span><span style="color: #000000;">?</span><span style="color: #000000;">&nbsp;JsonUti.n&nbsp;:&nbsp;</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;</span><span style="color: #008000;">//</span><span style="color: #008000;">如果Json对象是内部，就要换行格式化</span><span style="color: #008000;"><br></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;</span><span style="color: #000000;">+</span><span style="color: #000000;">&nbsp;JsonUti.__repeatStr(JsonUti.t,&nbsp;level&nbsp;</span><span style="color: #000000;">-</span><span style="color: #000000;">&nbsp;</span><span style="color: #000000;">1</span><span style="color: #000000;">)&nbsp;</span><span style="color: #000000;">+</span><span style="color: #000000;">&nbsp;</span><span style="color: #000000;">"</span><span style="color: #000000;">{</span><span style="color: #000000;">"</span><span style="color: #000000;">&nbsp;</span><span style="color: #000000;">+</span><span style="color: #000000;">&nbsp;JsonUti.n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #008000;">//</span><span style="color: #008000;">加层次Tab格式化</span><span style="color: #008000;"><br></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;</span><span style="color: #000000;">+</span><span style="color: #000000;">&nbsp;currentObjStrings.join(</span><span style="color: #000000;">"</span><span style="color: #000000;">,</span><span style="color: #000000;">"</span><span style="color: #000000;">&nbsp;</span><span style="color: #000000;">+</span><span style="color: #000000;">&nbsp;JsonUti.n)&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></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;</span><span style="color: #000000;">+</span><span style="color: #000000;">&nbsp;JsonUti.n&nbsp;</span><span style="color: #000000;">+</span><span style="color: #000000;">&nbsp;JsonUti.__repeatStr(JsonUti.t,&nbsp;level&nbsp;</span><span style="color: #000000;">-</span><span style="color: #000000;">&nbsp;</span><span style="color: #000000;">1</span><span style="color: #000000;">)&nbsp;</span><span style="color: #000000;">+</span><span style="color: #000000;">&nbsp;</span><span style="color: #000000;">"</span><span style="color: #000000;">}</span><span style="color: #000000;">"</span><span style="color: #000000;">;&nbsp;&nbsp;&nbsp;</span><span style="color: #008000;">//</span><span style="color: #008000;">封闭对象</span><span style="color: #008000;"><br></span><span style="color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__isArray:&nbsp;</span><span style="color: #0000ff;">function</span><span style="color: #000000;">(obj)&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">if</span><span style="color: #000000;">&nbsp;(obj)&nbsp;{<br>&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;">return</span><span style="color: #000000;">&nbsp;obj.constructor&nbsp;</span><span style="color: #000000;">==</span><span style="color: #000000;">&nbsp;Array;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">return</span><span style="color: #000000;">&nbsp;</span><span style="color: #0000ff;">false</span><span style="color: #000000;">;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__repeatStr:&nbsp;</span><span style="color: #0000ff;">function</span><span style="color: #000000;">(str,&nbsp;times)&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">var</span><span style="color: #000000;">&nbsp;newStr&nbsp;</span><span style="color: #000000;">=</span><span style="color: #000000;">&nbsp;[];<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">if</span><span style="color: #000000;">&nbsp;(times&nbsp;</span><span style="color: #000000;">&gt;</span><span style="color: #000000;">&nbsp;</span><span style="color: #000000;">0</span><span style="color: #000000;">)&nbsp;{<br>&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;">for</span><span style="color: #000000;">&nbsp;(</span><span style="color: #0000ff;">var</span><span style="color: #000000;">&nbsp;i&nbsp;</span><span style="color: #000000;">=</span><span style="color: #000000;">&nbsp;</span><span style="color: #000000;">0</span><span style="color: #000000;">;&nbsp;i&nbsp;</span><span style="color: #000000;">&lt;</span><span style="color: #000000;">&nbsp;times;&nbsp;i</span><span style="color: #000000;">++</span><span style="color: #000000;">)&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;newStr.push(str);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">return</span><span style="color: #000000;">&nbsp;newStr.join(</span><span style="color: #000000;">""</span><span style="color: #000000;">);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;};<br>&nbsp;<br></span></div>
<br>实例下载：<a  href="http://www.cnitblog.com/Files/seeyeah/JsonToString.rar" title="JsonToString.rar">JsonToString.rar</a><br><img src ="http://www.cnitblog.com/seeyeah/aggbug/61618.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/seeyeah/" target="_blank">KiMoGiGi</a> 2009-09-29 00:44 <a href="http://www.cnitblog.com/seeyeah/archive/2009/09/29/61618.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>对ashx请求用Gzip,Deflated压缩</title><link>http://www.cnitblog.com/seeyeah/archive/2009/09/15/61405.html</link><dc:creator>KiMoGiGi</dc:creator><author>KiMoGiGi</author><pubDate>Tue, 15 Sep 2009 01:06:00 GMT</pubDate><guid>http://www.cnitblog.com/seeyeah/archive/2009/09/15/61405.html</guid><wfw:comment>http://www.cnitblog.com/seeyeah/comments/61405.html</wfw:comment><comments>http://www.cnitblog.com/seeyeah/archive/2009/09/15/61405.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/seeyeah/comments/commentRss/61405.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/seeyeah/services/trackbacks/61405.html</trackback:ping><description><![CDATA[摘至：<a id="ctl04_TitleUrl" class="postTitle2" href="http://www.cnblogs.com/liuju150/archive/2009/09/14/1566479.html">对ashx请求用Gzip,Deflated压缩</a><br /><br />//GZIP压缩<br /><br /><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>--><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">查看请求头部</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);"> acceptEncoding </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> context.Request.Headers[</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">Accept-Encoding</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">].ToString().ToUpperInvariant();<br /></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);">String.IsNullOrEmpty(acceptEncoding))<br />{<br />    </span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">如果头部里有包含"GZIP”,"DEFLATE",表示你浏览器支持GZIP,DEFLATE压缩</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">    </span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);"> (acceptEncoding.Contains(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">GZIP</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">))<br />    {<br />        </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 /></span><span style="color: rgb(0, 0, 0);">        context.Response.AppendHeader(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">Content-encoding</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);">gzip</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br />        context.Response.Filter </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> GZipStream(context.Response.Filter, CompressionMode.Compress);<br />    }<br />    </span><span style="color: rgb(0, 0, 255);">else</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);"> (acceptEncoding.Contains(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">DEFLATE</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">))<br />    {<br />        </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 /></span><span style="color: rgb(0, 0, 0);">        context.Response.AppendHeader(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">Content-encoding</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);">deflate</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br />        context.Response.Filter </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> DeflateStream(context.Response.Filter, CompressionMode.Compress);<br />    }<br />}</span></div><br /><p>这样每次context.Response.Write出支的数据就压缩了</p><p>对效多的文本信息压缩可以压缩到原来三分之一到四分之一的样子</p><p>如果发送的信息只有几个字节就没有必要了</p><br /><br /><br /><img src ="http://www.cnitblog.com/seeyeah/aggbug/61405.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/seeyeah/" target="_blank">KiMoGiGi</a> 2009-09-15 09:06 <a href="http://www.cnitblog.com/seeyeah/archive/2009/09/15/61405.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>js控制media player参数</title><link>http://www.cnitblog.com/seeyeah/archive/2009/09/10/61344.html</link><dc:creator>KiMoGiGi</dc:creator><author>KiMoGiGi</author><pubDate>Thu, 10 Sep 2009 06:50:00 GMT</pubDate><guid>http://www.cnitblog.com/seeyeah/archive/2009/09/10/61344.html</guid><wfw:comment>http://www.cnitblog.com/seeyeah/comments/61344.html</wfw:comment><comments>http://www.cnitblog.com/seeyeah/archive/2009/09/10/61344.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/seeyeah/comments/commentRss/61344.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/seeyeah/services/trackbacks/61344.html</trackback:ping><description><![CDATA[
		<div class="blog_content">
				<div class="postbody">
						<div class="code">&lt;object id="player" height="64" width="260" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"&gt; <br />&lt;param NAME="AutoStart" VALUE="-1"&gt; <br />&lt;!--是否自动播放--&gt; <br />&lt;param NAME="Balance" VALUE="0"&gt; <br />&lt;!--调整左右声道平衡,同上面旧播放器代码--&gt; <br />&lt;param name="enabled" value="-1"&gt; <br />&lt;!--播放器是否可人为控制--&gt; <br />&lt;param NAME="EnableContextMenu" VALUE="-1"&gt; <br />&lt;!--是否启用上下文菜单--&gt; <br />&lt;param NAME="url" value="/blog/1.wma"&gt; <br />&lt;!--播放的文件地址--&gt; <br />&lt;param NAME="PlayCount" VALUE="1"&gt; <br />&lt;!--播放次数控制,为整数--&gt; <br />&lt;param name="rate" value="1"&gt; <br />&lt;!--播放速率控制,1为正常,允许小数,1.0-2.0--&gt; <br />&lt;param name="currentPosition" value="0"&gt; <br />&lt;!--控件设置:当前位置--&gt; <br />&lt;param name="currentMarker" value="0"&gt; <br />&lt;!--控件设置:当前标记--&gt; <br />&lt;param name="defaultFrame" value=""&gt; <br />&lt;!--显示默认框架--&gt; <br />&lt;param name="invokeURLs" value="0"&gt; <br />&lt;!--脚本命令设置:是否调用URL--&gt; <br />&lt;param name="baseURL" value=""&gt; <br />&lt;!--脚本命令设置:被调用的URL--&gt; <br />&lt;param name="stretchToFit" value="0"&gt; <br />&lt;!--是否按比例伸展--&gt; <br />&lt;param name="volume" value="50"&gt; <br />&lt;!--默认声音大小0%-100%,50则为50%--&gt; <br />&lt;param name="mute" value="0"&gt; <br />&lt;!--是否静音--&gt; <br />&lt;param name="uiMode" value="mini"&gt; <br />&lt;!--播放器显示模式:Full显示全部;mini最简化;None不显示播放控制,只显示视频窗口;invisible全部不显示--&gt; <br />&lt;param name="windowlessVideo" value="0"&gt; <br />&lt;!--如果是0可以允许全屏,否则只能在窗口中查看--&gt; <br />&lt;param name="fullScreen" value="0"&gt; <br />&lt;!--开始播放是否自动全屏--&gt; <br />&lt;param name="enableErrorDialogs" value="-1"&gt; <br />&lt;!--是否启用错误提示报告--&gt; <br />&lt;param name="SAMIStyle" value&gt; <br />&lt;!--SAMI样式--&gt; <br />&lt;param name="SAMILang" value&gt; <br />&lt;!--SAMI语言--&gt; <br />&lt;param name="SAMIFilename" value&gt; <br />&lt;!--字幕ID--&gt; <br />&lt;/object&gt;</div>
						<strong>常用的方法和属性：</strong>
						<div class="code">//基本属性<br />URL:String; 指定媒体位置，本机或网络地址<br />uiMode:String; 播放器界面模式，可为Full, Mini, None, Invisible<br />playState:integer; 播放状态，1=停止，2=暂停，3=播放，6=正在缓冲，9=正在连接，10=准备就绪<br />enableContextMenu:Boolean; 启用/禁用右键菜单（也是简单的防盗链方法）<br />fullScreen:boolean; 是否全屏显示<br /><br />//播放器控制属性<br />controls.play; 播放<br />controls.pause; 暂停<br />controls.stop; 停止<br />controls.currentPosition:double; 当前进度<br />controls.currentPositionString:string; 当前进度，字符串格式。如“00:23”<br />controls.fastForward; 快进<br />controls.fastReverse; 快退<br />controls.next; 下一曲<br />controls.previous; 上一曲<br />*注：上一曲和下一曲属性一般不能使用，因为这种功能是对一个播放列表气作用的，而对于新版本的播放器，js脚本一般没有权限去新建和修改播放列表的。只能自己去设计一个播放列表，自己去修改url属性去选曲。<br /><br />//播放器基本属性<br />settings.volume:integer; 音量，0-100<br />settings.autoStart:Boolean; 是否自动播放<br />settings.mute:Boolean; 是否静音<br />settings.playCount:integer; 播放次数<br /><br />//当前播放媒体的属性<br />currentMedia.duration:double; 媒体总长度<br />currentMedia.durationString:string; 媒体总长度，字符串格式。如“03:24”<br />currentMedia.getItemInfo(const
string);
获取当前媒体信息"Title"=媒体标题，"Author"=艺术家，"Copyright"=版权信息，"Description"=媒体内容描
述，"Duration"=持续时间（秒），"FileSize"=文件大小，"FileType"=文件类型，"sourceURL"=原始地址<br />currentMedia.setItemInfo(const string); 通过属性名设置媒体信息<br />currentMedia.name:string; 同 currentMedia.getItemInfo("Title")<br />[currentPlaylist] wmp.currentPlaylist //当前播放列表属性<br />currentPlaylist.count:integer; 当前播放列表所包含媒体数<br />currentPlaylist.Item[integer]; 获取或设置指定项目媒体信息，其子属性同wmp.currentMedia<br /><br />//最后是一些很少用到的参数和属性<br />AllowChangeDisplaySize 返回或设置最终用户是否能设置显示尺寸(逻辑型)<br />AllowScan 返回或设置是否允许扫描(逻辑型)<br />AnimationAtStart 返回或设置控件开始播放之前是否先播放一个动画序列(逻辑型)<br />AudioStream 返回或设置音频流的编号(用于多音频流的剪辑，默认为-1)(长整型)<br />AutoRewind 返回或设置媒体文件播放完毕后是否自动回绕(逻辑型)<br />AutoSize 返回或设置是否自动调整控件大小来适应载入的媒体(逻辑型)<br />AutoStart 返回或设置在载入媒体文件之后是否自动开始播放(逻辑型)<br />Balance 返回或设置指定立体声媒体文件的播放声道(-10000为左声道，10000为右声道，0为立体声)(长整型)<br />Bandwidth 返回或设置当前文件的带宽(长整型)<br />BaseURL 返回基本的 HTTP URL(字符串)<br />BufferingCount 返回媒体文件回放时缓冲的总时间(长整型)<br />BufferingProgress 返回缓冲完成的百分比(长整型)<br />BufferingTime 返回缓冲的时间(双精度型)<br />CanPreview 返回或设置当前显示的剪辑是能否被预览(逻辑型)<br />CanScan 返回或设置当前文件是否支持快进或快退(逻辑型)<br />CanSeek 返回或设置当前文件是否能搜索并定位到某个时间(逻辑型)<br />CanSeekToMarkers 返回或设置文件是否支持搜索到标签(逻辑型)<br />CaptioningID 返回在标题中显示的帧或控件的名称(字符串)<br />ChannelDescription 返回电台的描述(字符串)<br />ChannelName 返回电台的名称(字符串)<br />ChannelURL 返回电台的元文件的位置(字符串)<br />ClickToPlay 返回或设置是否可以通过点击图像暂停或播放剪辑(逻辑型)<br />ClientID 返回客户端唯一的标识符(字符串)<br />CodecCount 返回文件使用的可安装的 codecs 的个数(长整型)<br />ContactAddress 返回电台的联系地址(字符串)<br />ContactEmail 返回电台的联系电子邮件地址(字符串)<br />ContactPhone 返回电台的联系电话(字符串)<br />CreationDate 返回剪辑的创建日期(日期型)<br />CurrentMarker 返回或设置当前书签号码(长整型)<br />CurrentPosition 返回或设置剪辑的当前位置(双精度型)<br />CursorType 返回或设置指针类型(长整型)<br />DefaultFrame 返回或设置控件的默认目标 Http 帧(字符串)<br />DisplayBackColor 返回或设置显示面板的背景色(OLE_COLOR 值)<br />DisplayForeColor 返回或设置显示面板的前景色(OLE_COLOR 值)<br />DisplayMode 返回或设置显示面板是否用秒或帧的形式显示当前位置(MPDisplayModeConstants 值)<br />DisplaySize 返回或设置图像显示窗口的大小(MPDisplaySizeConstant 值)<br />Duration 返回或设置剪辑剪辑的播放时间(双精度型)<br />EnableContextMenu 返回或设置是否允许使用上下文菜单(逻辑型)<br />Enabled 返回或设置控件是否可用(逻辑型)<br />EnableFullScreenControls 返回或设置全屏幕控制是否可用(逻辑型)<br />EnablePositionControls 返回或设置位置控制是否可用(逻辑型)<br />EnableTracker 返回或设置搜索栏控制是否可用(逻辑型)<br />ErrorCode 返回当前错误代码(长整型)<br />ErrorCorrection 返回当前剪辑的错误修正类型(长整型)<br />ErrorDescription 返回当前错误的描述(字符串)<br />FileName 返回或设置要播放的剪辑的文件名称(字符串)<br />HasError 返回控件是否发生错误(逻辑型)<br />HasMultipleItems 返回或设置控件是否包含某些多重项目的内容(逻辑型)<br />ImageSourceHeight 返回或设置当前剪辑的原始图像高度(长整型)<br />ImageSourceWidth 返回或设置当前剪辑的原始图像宽度(长整型)<br />InvokeURLs 返回或设置 URL 是否自动发送请求(逻辑型)<br />IsBroadcast 返回或设置源是否进行广播(逻辑型)<br />IsDurationValid 返回或设置持续时间值是否有效(逻辑型)<br />Language 返回或设置用于本地化语言支持的当前区域语言(长整型)<br />LostPackets 返回丢失的数据包数量(长整型)<br />MarkerCount 返回文件书签的数量(长整型)<br />Mute 返回或设置控件是否播放声音(逻辑型)<br />OpenState 返回控件的内容源状态(长整型)<br />PlayCount 返回或设置一个剪辑播放的次数(长整型)<br />PlayState 返回控件的当前操作状态(长整型)<br />PreviewMode 返回或设置控件是否处在预览模式(逻辑型)<br />Rate 返回或设置回放帧频(双精度型)<br />ReadyState 返回控件是否准备就绪(ReadyStateConstant 值)<br />ReceivedPackets 返回已接收到的数据包的数量(长整型)<br />ReceptionQuality 返回最后 30 秒接收到的数据包的百分比(长整型)<br />RecoveredPackets 返回已转换的数据包的数量(长整型)<br />SAMIFileName 返回或设置 closed-captioning 文件名(字符串)<br />SAMILang 返回或设置 closed captioning 语言(字符串)<br />SAMIStyle 返回或设置 closed captioning 风格(字符串)<br />SelectionEnd 返回或设置流的结束位置(双精度型)<br />SelectionStart 返回或设置流的起始位置(双精度型)<br />SendErrorEvents 返回或设置控件是否发送错误事件(逻辑型)<br />SendKeyboardEvents 返回或设置控件是否发送键盘事件(逻辑型)<br />SendMouseClickEvents 返回或设置控件是否发送鼠标单击事件(逻辑型)<br />SendMouseMoveEvents 返回或设置控件是否发送鼠标移动事件(逻辑型)<br />SendOpenStateChangeEvents 返回或设置控件是否发送打开状态改变事件(逻辑型)<br />SendPlayStateChangeEvents 返回或设置控件是否发送播放状态改变事件(逻辑型)<br />SendWarningEvents 返回或设置控件是否发送警告事件(逻辑型)<br />ShowAudioControls 返回或设置是否显示音频控制(逻辑型)<br />ShowCaptioning 返回或设置是否显示字幕(逻辑型)<br />ShowControls 返回或设置控制面板是否可见(逻辑型)<br />ShowDisplay 返回或设置是否显示显示面板(逻辑型)<br />ShowGotoBar 返回或设置是否显示跳转栏(逻辑型)<br />ShowPositionControls 返回或设置是否显示位置控制(逻辑型)<br />ShowStatusBar 返回或设置是否显示状态栏(逻辑型)<br />ShowTracker 返回或设置是否显示搜索栏(逻辑型)<br />SourceLink 返回内容文件的路径(字符串)<br />SourceProtocol 返回用于接收数据的协议(长整型)<br />StreamCount 返回媒体帧的数量(长整型)<br />TransparentAtStart 返回或设置在开始播放之前和停止之后控件是否透明(逻辑型)<br />VideoBorder3D 返回或设置视频边框是否显示为 3D 效果(逻辑型)<br />VideoBorderColor 返回或设置视频边框的颜色(OLE_颜色)<br />VideoBorderWidth 返回或设置视频边框的宽度(长整型)<br />Volume 返回或设置音量(长整型)</div>
				</div>
		</div>
<img src ="http://www.cnitblog.com/seeyeah/aggbug/61344.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/seeyeah/" target="_blank">KiMoGiGi</a> 2009-09-10 14:50 <a href="http://www.cnitblog.com/seeyeah/archive/2009/09/10/61344.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>科学的设计你的网站网页</title><link>http://www.cnitblog.com/seeyeah/archive/2009/01/18/53858.html</link><dc:creator>KiMoGiGi</dc:creator><author>KiMoGiGi</author><pubDate>Sun, 18 Jan 2009 14:03:00 GMT</pubDate><guid>http://www.cnitblog.com/seeyeah/archive/2009/01/18/53858.html</guid><wfw:comment>http://www.cnitblog.com/seeyeah/comments/53858.html</wfw:comment><comments>http://www.cnitblog.com/seeyeah/archive/2009/01/18/53858.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/seeyeah/comments/commentRss/53858.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/seeyeah/services/trackbacks/53858.html</trackback:ping><description><![CDATA[<h1 class="postTitle"><a id="AjaxHolder_ctl01_TitleUrl" class="postTitle2" href="http://www.cnblogs.com/autumnsea/archive/2009/01/16/1377145.html">摘至：科学的设计你的网站网页</a></h1>
<p>在网络设计领域关于Eye-Tracking的研究十分火爆，但是如何把这些研究结果转变为具体可行的设计来运作依旧是个难点。以下就是一些来自于Eye-Tracking研究结果的窍门，可以为改进你的<strong style="font-weight: normal;"><strong>网站设计</strong></strong>提供些意见：</p>
<p>1.对比图像，文字更具吸引力</p>
<p>与你所认为的相反，在浏览一个网站的时候，能够直接吸引用户目光的并不是图像。大多数通过偶然点击进入你的网站的用户，他们是来寻觅信息的而不是图像。因此，保证你的网站设计凸现出最重要的信息板块，这才是设计的首要原则。</p>
<p>2.眼球的第一运动聚焦于网页的左上角</p>
<p>用户浏览网页的这一习惯应该在意料之中，毕竟左上部为主要操作中心这一点为大多数重要的计算机应用程序的设计所采用。在你构建网站考虑网站设计时，应该尽量保持这一格式。要知道，如果你希望保持个人特色，搭建一个成功的网站，你就必须尊重用户们的习惯。</p>
<p>3.用户浏览网页时，首先观察网页的左上部和上层部分，之后再往下阅读，浏览右边的内容</p>
<p>用户普遍的浏览方式呈现出&#8220;F&#8221;的形状 。保证网站内容的重要要素集中于这些关键区域，以此确保读者的参与。在此放置头条，副题，热点以及重要文章，这样可以吸引到读者进行阅读。</p>
<p>4.读者会忽视横幅广告</p>
<p>研究表明，读者常忽视大部分的横幅广告——尽管你以此维持网站生计——视线往往只停留几分之一秒。如果你想通过广告挣钱，那么必须创新你的广告位以及合理配置网站广告形式。</p>
<p>5.花哨的字体和格式被忽视</p>
<p>为什么呢？那是因为用户会认为这些是广告，并非他们所需要的信息。事实上，研究表明用户很难在充满大量颜色的花哨字体格式里寻找到所需的信息，因为视觉线索告诉他们把这些忽略吧。保持网站的清爽，不要因为华而不实的表面，让重要的信息被忽略。</p>
<p>6.用数词来代替数字</p>
<p>如果使用数词取代数字的罗列，读者会发现在你的网站可以很容易地发现真实的资料。要知道，你是写给那些将第一次浏览你的网站的读者，所以，让他们容易发现他们所需的信息，让他们感兴趣。</p>
<p>7.字体大小影响浏览行为</p>
<p>想改变人们对你的网页的看法吗？改变网页字体的大小。大的字体刺激浏览，而小一些的字体则提高焦点阅读量。根据你的需要，合理配置两者的比例。</p>
<p>8.遇到感兴趣的内容，用户仅会多看一眼副标题</p>
<p>不要过分坚持副标题固定的格式——保证他们的相关性和兴趣。你也可以让副标题包含关键词，这样可以有效利用搜索引擎，让它带来读者。</p>
<p>9.人们大都只浏览网页的小部分内容</p>
<p>如果在用户浏览的时候提供信息使他们尽快锁定目标，就可以把这一点发展成为你的优势。突出某些部分或者创建项目列表使网页信息容易找到和阅读。</p>
<p>10.简短的段落相对于长段落来说有更好的表现力</p>
<p>网页信息是为大多数强调快速浏览的无联网用户提供的。除非上下文的衔接要求，保持信息由简短的段落和句式组成，例如 这个电子商务网站 的产品介绍。</p>
<p>11.根据视觉锁定，一栏格式比多栏格式拥有更好的表现力</p>
<p>别让过多的信息把网站来访者淹没。大多数情况下，简洁更具力量。多栏内容容易被用户忽视，我们需要消除这些干扰。</p>
<p>12.网页顶部和左边的广告更能吸引眼球</p>
<p>如需要在网站植入广告，试图使他们融入网页的左上部，这样他们才能吸引到最大的视觉注意力。当然，用户仅仅会注意到这些广告，这并不意味着他们会用鼠标点击。所以不要为了提高广告的注意力而牺牲原有的网站设计。</p>
<p>13.将广告放置与最佳内容一旁也可以提升注意力</p>
<p>如果想要提升广告的可视性和点击率，可以将其设置于最能引起人兴趣的内容一旁，整合进网页的设计里。这样，用户既可以找到所需的内容，你也能提升广告的效益。</p>
<p>14.在各种测试中，人们阅读文字广告最为专心。</p>
<p>正如上面提到的，一般的互联网用户不会花费太多时间用于查看那些一眼就能看出是广告的内容。这就是文字广告表现出众的原因。他们并没有分散注意力，而是与网页的其它部分内容融为一体，这让他们减少了对读者的视觉刺激，也使这一广告形式获得成功的阅读率。</p>
<p>15.越大的图像吸引越多的注意力</p>
<p>如果要在网页中使用图片，那越大越好。人们更倾向于查看那些能够清楚地看到细节和获取信息的图像。要保证你所用的图片与文章内容相关，否则它更容易被忽视。大多数读者都拥有高速的连接速度，所以请放心在你的网站上使用那些较大体积的图片。</p>
<p>16.干净、清晰的特写图片能吸引更多的视觉注意</p>
<p>可能那些抽象的艺术图片会让你的网站看起来很有味道，但是他们并不会吸引多少读者的注意力。如果你需要使用到这些图片，请确保所用图片的清晰以及其表达内容的简单可读性。必须注意的是，那些与真实的&#8220;人&#8221;相关的图片比所谓的模特图片更为&#8220;优秀&#8221;。</p>
<p>17.标题能吸引眼球</p>
<p>浏览网页时，读者能发现的第一内容是标题。确保网页的所有相关链接畅通和有效，以让读者顺利的通过网站进一步搜索。</p>
<p>18.用户花费大量时间察看按钮和菜单</p>
<p>所以，你需要花费额外的时间维护你的精心设计。毕竟，他们不仅吸引了读者的眼球，更是<strong style="font-weight: normal;">网站设计</strong>的重要组成要素。</p>
<p>19.表单格式可以延长读者的注意时间</p>
<p>分解内容和段落，大量使用表单形式来表现你的文章，可以保证读者的浏览率。使用数字和其它标记符号来突出文章的重要内容，会让网站更容易浏览，用户更快的找到所需的信息。</p>
<p>20.避免呈现大块的文本</p>
<p>研究显示，一般的网络浏览者不会花费时间去阅读大块的文本，无论他们有多重要或写得多好。因此，必须把这些大文本分解为若干小段落。突出重要的地方，放置点击的按钮也可以提高用户的注意力。</p>
<p>21.格式可以吸引注意力</p>
<p>在文中使用粗体、大写、彩体、下划线可以帮助用户获取正文所表达的最主要的信息。使用时需要谨慎，因为过多的使用会使你的网页难以阅读，把读者吓跑。</p>
<p>22.利用好空白</p>
<p>尽管把网页的每寸空间都填满这个想法十分诱人，但事实上让网站留出部分剩余更为不错。网站的过量信息会把用户淹没，同时他们也会忘记所提供的大部分的内容。所以保持网页的简洁，给读者预留出一些视觉空间来供读者休息。</p>
<p>23.放置于网页顶部，导航工具的作用将更好的发挥</p>
理想情况下，你不会满足于当读者打开你的网站时仅浏览初始页，而是希望他们浏览翻阅，察看其它感兴趣的内容。将导航器置于网页顶部，就可以让用户通过使用这个工具轻松的找到所需的目标内容。
<br> <img src ="http://www.cnitblog.com/seeyeah/aggbug/53858.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/seeyeah/" target="_blank">KiMoGiGi</a> 2009-01-18 22:03 <a href="http://www.cnitblog.com/seeyeah/archive/2009/01/18/53858.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>清爽配色15套</title><link>http://www.cnitblog.com/seeyeah/archive/2009/01/14/53773.html</link><dc:creator>KiMoGiGi</dc:creator><author>KiMoGiGi</author><pubDate>Wed, 14 Jan 2009 14:02:00 GMT</pubDate><guid>http://www.cnitblog.com/seeyeah/archive/2009/01/14/53773.html</guid><wfw:comment>http://www.cnitblog.com/seeyeah/comments/53773.html</wfw:comment><comments>http://www.cnitblog.com/seeyeah/archive/2009/01/14/53773.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/seeyeah/comments/commentRss/53773.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/seeyeah/services/trackbacks/53773.html</trackback:ping><description><![CDATA[摘至：<a class=postTitle2 id=AjaxHolder_ctl01_TitleUrl href="http://www.cnblogs.com/williamwindy/archive/2009/01/14/1375844.html"><u><font color=#800080>清爽配色15套</font></u></a><br><br>效果不错，有参考价值～！<br><br>
<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><span style="COLOR: #0000ff">&lt;!</span><span style="COLOR: #ff00ff">DOCTYPE&nbsp;HTML&nbsp;PUBLIC&nbsp;"-//W3C//DTD&nbsp;HTML&nbsp;4.0&nbsp;Transitional//EN"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br><br></span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">html</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br></span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">title</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000">清爽配色15套</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">title</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br></span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">style&nbsp;</span><span style="COLOR: #ff0000">type</span><span style="COLOR: #0000ff">="text/css"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #800000; BACKGROUND-COLOR: #f5f5f5"><br>.style1</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">{</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>width</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;800px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>height</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;100px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>margin</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;0px&nbsp;auto</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>margin-bottom</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">20px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>border</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">1px&nbsp;solid&nbsp;#96C2F1</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>background-color</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;#EFF7FF<br></span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">}</span><span style="COLOR: #800000; BACKGROUND-COLOR: #f5f5f5">&nbsp;<br>.style2</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">{</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>width</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;800px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>height</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;100px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>margin</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;0px&nbsp;auto</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>margin-bottom</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">20px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>border</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">1px&nbsp;solid&nbsp;#9BDF70</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>background-color</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;#F0FBEB<br></span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">}</span><span style="COLOR: #800000; BACKGROUND-COLOR: #f5f5f5"><br><br>.style3</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">{</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>width</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;800px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>height</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;100px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>margin</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;0px&nbsp;auto</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>margin-bottom</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">20px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>border</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">1px&nbsp;solid&nbsp;#BBE1F1</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>background-color</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;#EEFAFF<br></span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">}</span><span style="COLOR: #800000; BACKGROUND-COLOR: #f5f5f5"><br><br>.style4</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">{</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>width</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;800px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>height</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;100px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>margin</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;0px&nbsp;auto</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>margin-bottom</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">20px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>border</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">1px&nbsp;solid&nbsp;#CCEFF5</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>background-color</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;#FAFCFD<br></span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">}</span><span style="COLOR: #800000; BACKGROUND-COLOR: #f5f5f5"><br><br>.style5</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">{</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>width</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;800px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>height</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;100px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>margin</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;0px&nbsp;auto</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>margin-bottom</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">20px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>border</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">1px&nbsp;solid&nbsp;#FFCC00</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>background-color</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;#FFFFF7<br></span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">}</span><span style="COLOR: #800000; BACKGROUND-COLOR: #f5f5f5"><br><br>.style6</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">{</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>width</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;800px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>height</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;100px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>margin</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;0px&nbsp;auto</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>margin-bottom</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">20px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>border</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">1px&nbsp;solid&nbsp;#92B0DD</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>background-color</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;#FFFFFf<br></span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">}</span><span style="COLOR: #800000; BACKGROUND-COLOR: #f5f5f5"><br>.style6&nbsp;h5</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">{</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>margin</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;1px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>background-color</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;#E2EAF8</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>height</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;24px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br></span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">}</span><span style="COLOR: #800000; BACKGROUND-COLOR: #f5f5f5"><br><br>.style7</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">{</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>width</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;800px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>height</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;100px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>margin</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;0px&nbsp;auto</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>margin-bottom</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">20px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>border</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">1px&nbsp;solid&nbsp;#A9C9E2</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>background-color</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;#E8F5FE<br></span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">}</span><span style="COLOR: #800000; BACKGROUND-COLOR: #f5f5f5"><br><br>.style8</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">{</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>width</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;800px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>height</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;100px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>margin</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;0px&nbsp;auto</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>margin-bottom</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">20px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>border</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">1px&nbsp;solid&nbsp;#E3E197</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>background-color</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;#FFFFDD<br></span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">}</span><span style="COLOR: #800000; BACKGROUND-COLOR: #f5f5f5"><br><br>.style9</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">{</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>width</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;800px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>height</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;100px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>margin</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;0px&nbsp;auto</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>margin-bottom</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">20px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>border</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">1px&nbsp;solid&nbsp;#ADCD3C</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>background-color</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;#F2FDDB<br></span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">}</span><span style="COLOR: #800000; BACKGROUND-COLOR: #f5f5f5"><br><br>.style10</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">{</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>width</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;800px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>height</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;100px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>margin</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;0px&nbsp;auto</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>margin-bottom</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">20px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>border</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">1px&nbsp;solid&nbsp;#F8B3D0</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>background-color</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;#FFF5FA<br></span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">}</span><span style="COLOR: #800000; BACKGROUND-COLOR: #f5f5f5"><br><br>.style11</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">{</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>width</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;800px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>height</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;100px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>margin</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;0px&nbsp;auto</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>margin-bottom</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">20px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>border</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">1px&nbsp;solid&nbsp;#D3D3D3</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>background-color</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;#F7F7F7<br></span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">}</span><span style="COLOR: #800000; BACKGROUND-COLOR: #f5f5f5"><br><br>.style12</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">{</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>width</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;800px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>height</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;100px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>margin</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;0px&nbsp;auto</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>margin-bottom</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">20px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>border</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">1px&nbsp;solid&nbsp;#BFD1EB</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>background-color</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;#F3FAFF<br></span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">}</span><span style="COLOR: #800000; BACKGROUND-COLOR: #f5f5f5"><br><br>.style13</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">{</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>width</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;800px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>height</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;100px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>margin</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;0px&nbsp;auto</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>margin-bottom</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">20px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>border</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">1px&nbsp;solid&nbsp;#FFDD99</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>background-color</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;#FFF9ED<br></span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">}</span><span style="COLOR: #800000; BACKGROUND-COLOR: #f5f5f5">&nbsp;<br><br>.style14</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">{</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>width</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;800px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>height</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;100px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>margin</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;0px&nbsp;auto</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>margin-bottom</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">20px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>border</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">1px&nbsp;solid&nbsp;#CACAFF</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>background-color</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;#F7F7FF<br></span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">}</span><span style="COLOR: #800000; BACKGROUND-COLOR: #f5f5f5">&nbsp;<br><br>.style15</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">{</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>width</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;800px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>height</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;100px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>margin</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;0px&nbsp;auto</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>margin-bottom</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">20px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>border</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">1px&nbsp;solid&nbsp;#A5B6C8</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>background-color</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;#EEF3F7<br></span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">}</span><span style="COLOR: #800000; BACKGROUND-COLOR: #f5f5f5"><br>.style16</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">{</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>width</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;800px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>height</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;100px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>margin</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;0px&nbsp;auto</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>margin-bottom</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">20px</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>border</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">1px&nbsp;solid&nbsp;#CEE3E9</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;</span><span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5"><br>background-color</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">&nbsp;#F1F7F9<br></span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">}</span><span style="COLOR: #800000; BACKGROUND-COLOR: #f5f5f5">&nbsp;<br></span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">style</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br><br></span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">div&nbsp;</span><span style="COLOR: #ff0000">class</span><span style="COLOR: #0000ff">="style1"</span><span style="COLOR: #0000ff">&gt;&lt;</span><span style="COLOR: #800000">h5</span><span style="COLOR: #0000ff">&gt;&lt;/</span><span style="COLOR: #800000">h5</span><span style="COLOR: #0000ff">&gt;&lt;/</span><span style="COLOR: #800000">div</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br></span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">div&nbsp;</span><span style="COLOR: #ff0000">class</span><span style="COLOR: #0000ff">="style2"</span><span style="COLOR: #0000ff">&gt;&lt;</span><span style="COLOR: #800000">h5</span><span style="COLOR: #0000ff">&gt;&lt;/</span><span style="COLOR: #800000">h5</span><span style="COLOR: #0000ff">&gt;&lt;/</span><span style="COLOR: #800000">div</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br></span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">div&nbsp;</span><span style="COLOR: #ff0000">class</span><span style="COLOR: #0000ff">="style6"</span><span style="COLOR: #0000ff">&gt;&lt;</span><span style="COLOR: #800000">h5</span><span style="COLOR: #0000ff">&gt;&lt;/</span><span style="COLOR: #800000">h5</span><span style="COLOR: #0000ff">&gt;&lt;/</span><span style="COLOR: #800000">div</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br></span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">div&nbsp;</span><span style="COLOR: #ff0000">class</span><span style="COLOR: #0000ff">="style3"</span><span style="COLOR: #0000ff">&gt;&lt;/</span><span style="COLOR: #800000">div</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br></span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">div&nbsp;</span><span style="COLOR: #ff0000">class</span><span style="COLOR: #0000ff">="style4"</span><span style="COLOR: #0000ff">&gt;&lt;/</span><span style="COLOR: #800000">div</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br></span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">div&nbsp;</span><span style="COLOR: #ff0000">class</span><span style="COLOR: #0000ff">="style5"</span><span style="COLOR: #0000ff">&gt;&lt;/</span><span style="COLOR: #800000">div</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br></span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">div&nbsp;</span><span style="COLOR: #ff0000">class</span><span style="COLOR: #0000ff">="style7"</span><span style="COLOR: #0000ff">&gt;&lt;/</span><span style="COLOR: #800000">div</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br></span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">div&nbsp;</span><span style="COLOR: #ff0000">class</span><span style="COLOR: #0000ff">="style8"</span><span style="COLOR: #0000ff">&gt;&lt;/</span><span style="COLOR: #800000">div</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br></span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">div&nbsp;</span><span style="COLOR: #ff0000">class</span><span style="COLOR: #0000ff">="style9"</span><span style="COLOR: #0000ff">&gt;&lt;/</span><span style="COLOR: #800000">div</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br></span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">div&nbsp;</span><span style="COLOR: #ff0000">class</span><span style="COLOR: #0000ff">="style10"</span><span style="COLOR: #0000ff">&gt;&lt;/</span><span style="COLOR: #800000">div</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br></span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">div&nbsp;</span><span style="COLOR: #ff0000">class</span><span style="COLOR: #0000ff">="style11"</span><span style="COLOR: #0000ff">&gt;&lt;/</span><span style="COLOR: #800000">div</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br></span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">div&nbsp;</span><span style="COLOR: #ff0000">class</span><span style="COLOR: #0000ff">="style12"</span><span style="COLOR: #0000ff">&gt;&lt;/</span><span style="COLOR: #800000">div</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br></span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">div&nbsp;</span><span style="COLOR: #ff0000">class</span><span style="COLOR: #0000ff">="style13"</span><span style="COLOR: #0000ff">&gt;&lt;/</span><span style="COLOR: #800000">div</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br></span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">div&nbsp;</span><span style="COLOR: #ff0000">class</span><span style="COLOR: #0000ff">="style14"</span><span style="COLOR: #0000ff">&gt;&lt;/</span><span style="COLOR: #800000">div</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br></span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">div&nbsp;</span><span style="COLOR: #ff0000">class</span><span style="COLOR: #0000ff">="style15"</span><span style="COLOR: #0000ff">&gt;&lt;/</span><span style="COLOR: #800000">div</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br></span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">div&nbsp;</span><span style="COLOR: #ff0000">class</span><span style="COLOR: #0000ff">="style16"</span><span style="COLOR: #0000ff">&gt;&lt;/</span><span style="COLOR: #800000">div</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br><br><br></span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">html</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br></span></div>
<img src ="http://www.cnitblog.com/seeyeah/aggbug/53773.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/seeyeah/" target="_blank">KiMoGiGi</a> 2009-01-14 22:02 <a href="http://www.cnitblog.com/seeyeah/archive/2009/01/14/53773.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>关于Wiki发展相关文章</title><link>http://www.cnitblog.com/seeyeah/archive/2008/07/17/46852.html</link><dc:creator>KiMoGiGi</dc:creator><author>KiMoGiGi</author><pubDate>Thu, 17 Jul 2008 14:17:00 GMT</pubDate><guid>http://www.cnitblog.com/seeyeah/archive/2008/07/17/46852.html</guid><wfw:comment>http://www.cnitblog.com/seeyeah/comments/46852.html</wfw:comment><comments>http://www.cnitblog.com/seeyeah/archive/2008/07/17/46852.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cnitblog.com/seeyeah/comments/commentRss/46852.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/seeyeah/services/trackbacks/46852.html</trackback:ping><description><![CDATA[1、<a title="成长速度难以乐观 中文Wiki路在何方" href="http://news.21tx.com/2006/08/31/10735.html" target=_blank>成长速度难以乐观 中文Wiki路在何方</a><br><br>2、<a title="Wiki中国发展探路：不要总拿百科说事 " href="http://oss.lzu.edu.cn/blog/article.php?tid_419.html">Wiki中国发展探路：不要总拿百科说事 </a><br><br>3、<a title="国内Wiki发展的现状与趋势探析 " href="http://dev2all.blog.51cto.com/73116/11053" target=_blank>国内Wiki发展的现状与趋势探析 </a><br><br>4、<a title=如何大灶知识型的Wiki社群 href="http://internet.chinaitlab.com/meet/532080.html" target=_blank>如何大灶知识型的Wiki社群</a><br><br>5、<a title=Wiki的商业化之道 href="http://bbs.vsharing.com/Article.aspx?aid=433679" target=_blank>Wiki的商业化之道</a> <br><br>6、<a title=百度知道到底有什么用? href="http://zhidao.baidu.com/question/34549727.html?si=5&amp;wtp=wk">百度知道到底有什么用?</a>
<img src ="http://www.cnitblog.com/seeyeah/aggbug/46852.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/seeyeah/" target="_blank">KiMoGiGi</a> 2008-07-17 22:17 <a href="http://www.cnitblog.com/seeyeah/archive/2008/07/17/46852.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Cross-Site Scripting / 跨站腳本攻擊</title><link>http://www.cnitblog.com/seeyeah/archive/2008/07/10/46573.html</link><dc:creator>KiMoGiGi</dc:creator><author>KiMoGiGi</author><pubDate>Thu, 10 Jul 2008 14:27:00 GMT</pubDate><guid>http://www.cnitblog.com/seeyeah/archive/2008/07/10/46573.html</guid><wfw:comment>http://www.cnitblog.com/seeyeah/comments/46573.html</wfw:comment><comments>http://www.cnitblog.com/seeyeah/archive/2008/07/10/46573.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/seeyeah/comments/commentRss/46573.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/seeyeah/services/trackbacks/46573.html</trackback:ping><description><![CDATA[<p>Cross-Site Scripting中文譯為「跨站腳本攻擊」，簡稱XSS。此乃是駭客利用網站上允許使用者輸入字元或字串的欄位插入HTML與Script語言，造成其他正常使用者在觀看網頁的同時，瀏覽器會主動下載並執行部份惡意的程式碼，或被暗地裡導入到惡意的網站，而受到某種型態的影響。</p>
<p>XSS攻擊介於駭客與使用者之間的攻防戰，並<strong><span>不會</span></strong>對server主機有任何威脅，所以才被稱為跨站腳本攻擊，意思即是：駭客使用某些語言（腳本）跨過主機<span><strong>對使用者進行攻擊。</strong></span> <br><br>換句話說，要防止XSS攻擊，修改程式碼為不二法則。<span><strong>最簡單防止XSS的攻擊，必須在使用者輸入欄位加入過濾字串的功能，將『&lt;』、『&gt;』、『%』、『/』、『()』、『&amp;』等符號進行過濾不予輸出至網頁，或限定欄位長度的輸入。</strong></span></p>
<p>詳見全文：<a href="http://security.sinica.edu.tw/infosec-web/viewtopic.php?t=251">http://security.sinica.edu.tw/infosec-web/viewtopic.php?t=251</a></p>
<p>.....................................................................................................................................................................................</p>
<p>這裡有一份文件，很詳細。建議您一定要看（資料來源：地方政府資通安全服務中心 / <a href="http://www.sss.org.tw/">www.sss.org.tw</a>）</p>
<p>&nbsp;</p>
<p><font face="Times New Roman" size=4>Cross Site Script</font><font face=標楷體 size=4>漏洞檢測與說明會講義下載</font><font face="Times New Roman" size=4>：</font></p>
<p><font face="Times New Roman" size=4><a href="http://www.sss.org.tw/downloads/V0911.rar" initstyle="LEFT: 0px; VISIBILITY: visible; POSITION: relative! important" skipanim="true" fprolloverstyle="text-decoration: blink" dynamicanimation="fpAnimdropWordFP1"><span id=fpAnimdropWordFP endtop="0" endleft="0" inittop="-312" initleft="0" startl="130">Http://www.sss.org.tw/downloads/V0911.rar</span></a></font></p>
<p>.....................................................................................................................................................................................</p>
<p>&nbsp;</p>
<p><strong>2007十大Web安全漏洞 跨站腳本攻擊XSS居首</strong>&nbsp;</p>
<p><a href="http://financenews.sina.com/sinacn/304-000-106-109/2007-07-11/0350496219.html">http://financenews.sina.com/sinacn/304-000-106-109/2007-07-11/0350496219.html</a></p>
<p>開放Web軟件安全計劃(Open Web Application Security Project,OWASP)台灣分會今發表2007十大Web安全漏洞，年初曾發生在知名文件閱讀器Adobe Acrobat Reader上的跨站腳本攻擊(Cross Site Scripting,XSS)居首位。</p>
<p>.....................................................................................................................................................................................&nbsp;</p>
<p><strong>跨站腳本攻擊與防禦</strong>（簡體中文） <a href="http://www.xfocus.net/articles/200607/874.html">http://www.xfocus.net/articles/200607/874.html</a></p>
<p>所謂跨站腳本漏洞，其實就是Html的注入問題，惡意用戶的輸入，在沒有經過嚴格的控制下，進入了資料庫，最終顯示給來訪的用戶，導致可以在來訪用戶的瀏覽器裏，一執行（瀏覽）Html代碼，資料流程程如下：</p>
<p>惡意用戶的Html輸入—&gt;web程式—&gt;進入資料庫—&gt;web程式—&gt;用戶瀏覽器</p>
<p>這樣我們就可以清楚的看到Html代碼是如何進入受害者瀏覽器的了，我們也就可以根據這個流程來討論跨站腳本的攻擊與防禦了！<br>&nbsp;</p>
<p>.....................................................................................................................................................................................&nbsp;</p>
<p>其他相關文章：<a href="http://plog.longwin.com.tw/my-favorite-site/2007/03/17/xss_sql_injection_cheat_sheet_20070317"><strong>http://plog.longwin.com.tw/my-favorite-site/2007/03/17/xss_sql_injection_cheat_sheet_20070317</strong></a></p>
<p>&nbsp;</p>
<p>駭客就是這樣玩弄你的網站，看看這些輸入字串，你的網站是否有過濾呢？</p>
<p>沒有的話，XSS攻擊馬上到... <a href="http://ha.ckers.org/xss.html">http://ha.ckers.org/xss.html</a> &nbsp;</p>
<p>&nbsp;</p>
<p>需要更多資料，可以查詢 Google。關鍵字----跨站腳本攻擊</p>
<img src ="http://www.cnitblog.com/seeyeah/aggbug/46573.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/seeyeah/" target="_blank">KiMoGiGi</a> 2008-07-10 22:27 <a href="http://www.cnitblog.com/seeyeah/archive/2008/07/10/46573.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Could not load file or assembly 'System.Web.Extensions, Version=3.5.0.0 </title><link>http://www.cnitblog.com/seeyeah/archive/2007/11/16/36357.html</link><dc:creator>KiMoGiGi</dc:creator><author>KiMoGiGi</author><pubDate>Fri, 16 Nov 2007 06:05:00 GMT</pubDate><guid>http://www.cnitblog.com/seeyeah/archive/2007/11/16/36357.html</guid><wfw:comment>http://www.cnitblog.com/seeyeah/comments/36357.html</wfw:comment><comments>http://www.cnitblog.com/seeyeah/archive/2007/11/16/36357.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/seeyeah/comments/commentRss/36357.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/seeyeah/services/trackbacks/36357.html</trackback:ping><description><![CDATA[前两天,在编写ASP.NET 2.0的项目时，用到了Ajax Extension，.NET 2.0用的Ajax Extention是 1.0.61025.0 版本的。碰巧在开发的电脑上装了VS2008。问题出现了，再编译2.0这个项目，然后发不到Server上之后，运行Server上的这个WebSite，出现错误<strong>Could not load file or assembly 'System.Web.Extensions, Version=3.5.0.0......'</strong>, 这时候打开Web.Config，会发现在&lt;assemblies&gt;节中有两个配置节：<br>
<p>&nbsp;</p>
<div style="BORDER-RIGHT: rgb(204,204,204) 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: rgb(204,204,204) 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: rgb(204,204,204) 1px solid; WIDTH: 98%; PADDING-TOP: 4px; BORDER-BOTTOM: rgb(204,204,204) 1px solid; BACKGROUND-COLOR: rgb(238,238,238)"><!--<br />
<br />
Code highlighting produced by Actipro CodeHighlighter (freeware)<br />
http://www.CodeHighlighter.com/<br />
<br />
--><span style="COLOR: rgb(0,0,0)">&lt;</span><span style="COLOR: rgb(0,0,0)">add&nbsp;assembly</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">System.Web.Extensions.Design,&nbsp;Version=3.5.0.0, <br>Culture=neutral,&nbsp;PublicKeyToken=31BF3856AD364E35</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">/&gt;</span><span style="COLOR: rgb(0,0,0)"><br></span><span style="COLOR: rgb(0,0,0)">&lt;</span><span style="COLOR: rgb(0,0,0)">add&nbsp;assembly</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">System.Web.Extensions,&nbsp;Version=3.5.0.0, <br>Culture=neutral,&nbsp;PublicKeyToken=31BF3856AD364E35</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">/&gt;</span></div>
<br>&nbsp;&nbsp;&nbsp; 从上面的代码可以看到，编译器把System.Web.Extensions的3.5的版本编译进来了。把这个版本号改成1.0.61025.0，再编译一次，部署到Server上，运行Server上的WebSite。仍然会出现这个错误。<br>解决这个问题也很简单。到VS2008 Beta 2 的<a title=Download href="http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx" target=_blank><u><font color=#0000ff>Download</font></u></a><a></a>页面，他们说：<br>
<blockquote><em><strong>IMPORTANT:</strong> After the Beta 2 installation has finished, you should run this </em><a href="http://go.microsoft.com/fwlink/?linkid=95792"><em><u><font color=#0000ff>script</font></u></em></a><em> to ensure that the installation of .NET Framework 3.5 Beta 2 will not affect the development of ASP.NET AJAX 1.0 applications.<br></em></blockquote>&nbsp;&nbsp;&nbsp; 原来我没有下载并运行这个脚本，在网上搜一下发现并非一个人遇到这个问题，我相信并不是所有人读过VS下载页面的这个文章。安装VS2008后，下载这个脚本运行一下，这个问题就解决了。<br><br>
<hr>
引用<a class=singleposttitle id=AjaxHolder_ctl01_TitleUrl href="http://www.cnblogs.com/johnson2007/archive/2007/11/14/958834.html"><u><font color=#800080>Could not load file or assembly 'System.Web.Extensions, Version=3.5.0.0</font></u></a> 
<img src ="http://www.cnitblog.com/seeyeah/aggbug/36357.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/seeyeah/" target="_blank">KiMoGiGi</a> 2007-11-16 14:05 <a href="http://www.cnitblog.com/seeyeah/archive/2007/11/16/36357.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>少走弯路 Web开发网站制作十八条心得 </title><link>http://www.cnitblog.com/seeyeah/archive/2007/11/10/36097.html</link><dc:creator>KiMoGiGi</dc:creator><author>KiMoGiGi</author><pubDate>Sat, 10 Nov 2007 04:21:00 GMT</pubDate><guid>http://www.cnitblog.com/seeyeah/archive/2007/11/10/36097.html</guid><wfw:comment>http://www.cnitblog.com/seeyeah/comments/36097.html</wfw:comment><comments>http://www.cnitblog.com/seeyeah/archive/2007/11/10/36097.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/seeyeah/comments/commentRss/36097.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/seeyeah/services/trackbacks/36097.html</trackback:ping><description><![CDATA[转载 <a id=AjaxHolder_ctl01_TitleUrl href="http://www.cnblogs.com/Garnai/archive/2007/11/09/954185.html"><u><font color=#800080>少走弯路 Web开发网站制作十八条心得</font></u></a> <br>
<hr>
　<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WEB网站制作当中不可或少的会碰到各种问题，以下是开发时碰到的一些问题以及心得经验，避免大家少走弯路。例如：xml文件尽量以utf-8编码，对于常用的图片不要用img标签等等。<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WEB网站制作当中不可或少的会碰到各种问题，以下是开发时碰到的一些问题以及心得经验，避免大家少走弯路。
<p><font face=Verdana>　　1、xml文件尽量以utf-8编码，gb2312有些字是存储不了的，如?,就算能存也需要转换，比较麻烦，utf-8也符合国际规范。</font></p>
<p><font face=Verdana>　　2、CSS中:hover这个伪类，如果放在:visited前面则会失效。 </font></p>
<p><font face=Verdana>　　3、&lt;a&gt;标签如果没有href属性，所有对它的css的伪类如:hover均失效。<br>&nbsp;<br>　　4、js文件中用document.wirte("&lt;script language=&#8217;javascript&#8217; src=&#8217;" + file + "&#8217;&gt;&lt;/" + "script&gt;"形式的引用，其file相对路径均为引用该js的html的路径。 <br><br>　　如：a.htm 引用x\b.js,b.js引用x\c.js,则file应该为x\c.js而不是相对b.js的直接路径c.js，而css中的@import,url()引用不存在这个问题 </font></p>
<p><font face=Verdana>　　5、在页面中，有时talbe的宽设置为100%右边也会留下一个滚动条的空白，请设置&lt;body style="overflow:auto"&gt; </font></p>
<p><font face=Verdana>　　6、对于常用的图片不要用img标签，使用&lt;span&gt;&lt;a&gt;并用css指定其背景和宽高，对于做动态的（移上去变背景），使用&lt;a&gt;最好，不需要额外编写代码，只要利用伪类:hover就好了，使用css好处是一次改变全部改变，这点可以很好的利用在换皮肤的应用中。</font></p>
<p><font face=Verdana>　　7、@font-face {font-family:comic;src:url(<a href="http://valid_url/some_font_file.eot"><u><font color=#0000ff>http://valid_url/some_font_file.eot</font></u></a>);}<br><br>　　定义一种在本地没有的字体名称，调用&lt;span style="font-family:comic;font-size:18pt&gt;aa&lt;/span&gt; </font></p>
<p><font face=Verdana>　　8、几个CSS<br><br>
<table style="BORDER-RIGHT: #cccccc 1px dotted; TABLE-LAYOUT: fixed; BORDER-TOP: #cccccc 1px dotted; BORDER-LEFT: #cccccc 1px dotted; BORDER-BOTTOM: #cccccc 1px dotted" cellSpacing=0 cellPadding=6 width="95%" align=center border=0>
    <tbody>
        <tr>
            <td style="WORD-WRAP: break-word" bgColor=#f3f3f3>div&nbsp;{&nbsp;overflow:&nbsp;hidden;text-overflow:ellipsis;&nbsp;}&nbsp; <br>td&nbsp;{&nbsp;vertical-align&nbsp;:&nbsp;middle;&nbsp;}&nbsp;</td>
        </tr>
    </tbody>
</table>
<br>　　要强制溢出发生并且应用 ellipsis 值，作者必须设置对象的 white-space 属性值为 nowrap 。<br><br>　　假如没有换行机会(例如，对象容器的宽度是狭窄的，而内有很长的没有合理断行的文本)，没有应用 nowrap 也有可能溢出。<br><br>　　为了使 ellipsis 值被应用，此属性必须被设置到具有不可视区域的对象。最好的选择是设置 overflow 属性为 hidden。 </font></p>
<p><font face=Verdana>　　9、firefox的document.createElement不支持内容里有HTML标签,也不支持innerText，但是支持innerHTML,可以用innerHTML指定其内容。</font></p>
<p><font face=Verdana>　　10、.net控件里DropDownList在firefox下的宽度不着色，需要直接定义style=&#8217;width:10px;&#8217; </font></p>
<p><font face=Verdana>　　11、firefox中css的cursor不支持hand,使用pointer代替。<br>&nbsp;<br>　　12、iframe里的滚动条需要在iframe标签里设置style=&#8217;overflow:hidden&#8217;,不能仅仅在body里设置，在firefox会有问题。</font></p>
<p><font face=Verdana>　　13、在onpropertychange事件时，注意使用event.propertyName对属性改变事件过滤，在设置本事件时，其实已经改变了onpropertychange这个属性，所以会自动的执行一次。</font></p>
<p><font face=Verdana>　　14、js5.6里的对XSL的支持版本较低，如document函数就不支持。<br>&nbsp;<br>　　15、slice函数比直接循环获取数组片断慢。</font></p>
<p><font face=Verdana>　　16、nextSibling获得下一个对象时，需要注意，两个节点间不要有空格，否则很容易获取不到正确得对象。</font></p>
<p><font face=Verdana>　　17、CreateTextFile在有中文时必须指定第三个参数为true,否则不能写入中文，表现为Write写时报错。</font></p>
<p><font face=Verdana>　　18、保存中文文本时使用ADODB.stream,不使用fso,因为FSO不支持utf-8格式。</font></p>
<img src ="http://www.cnitblog.com/seeyeah/aggbug/36097.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/seeyeah/" target="_blank">KiMoGiGi</a> 2007-11-10 12:21 <a href="http://www.cnitblog.com/seeyeah/archive/2007/11/10/36097.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[分享]一个天气预报的WebService应用实例 </title><link>http://www.cnitblog.com/seeyeah/archive/2007/03/17/24182.html</link><dc:creator>KiMoGiGi</dc:creator><author>KiMoGiGi</author><pubDate>Sat, 17 Mar 2007 10:06:00 GMT</pubDate><guid>http://www.cnitblog.com/seeyeah/archive/2007/03/17/24182.html</guid><wfw:comment>http://www.cnitblog.com/seeyeah/comments/24182.html</wfw:comment><comments>http://www.cnitblog.com/seeyeah/archive/2007/03/17/24182.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.cnitblog.com/seeyeah/comments/commentRss/24182.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/seeyeah/services/trackbacks/24182.html</trackback:ping><description><![CDATA[
		<div class="postTitle"> </div>
		<div class="postText">在网上找到一个天气预报的WebService,还算比较全,现与大家分享<br /><img height="182" alt="" src="http://www.cnblogs.com/images/cnblogs_com/chy710/weather.JPG" width="316" border="0" /><br />地址：<a href="http://www.ayandy.com/">http://www.ayandy.com/</a><br />共有三个方法</div>
<img src ="http://www.cnitblog.com/seeyeah/aggbug/24182.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/seeyeah/" target="_blank">KiMoGiGi</a> 2007-03-17 18:06 <a href="http://www.cnitblog.com/seeyeah/archive/2007/03/17/24182.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Web测试方法</title><link>http://www.cnitblog.com/seeyeah/archive/2007/02/03/22631.html</link><dc:creator>KiMoGiGi</dc:creator><author>KiMoGiGi</author><pubDate>Sat, 03 Feb 2007 14:11:00 GMT</pubDate><guid>http://www.cnitblog.com/seeyeah/archive/2007/02/03/22631.html</guid><wfw:comment>http://www.cnitblog.com/seeyeah/comments/22631.html</wfw:comment><comments>http://www.cnitblog.com/seeyeah/archive/2007/02/03/22631.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/seeyeah/comments/commentRss/22631.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/seeyeah/services/trackbacks/22631.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 在Web工程过程中，基于Web系统的测试、确认和验收是一项重要而富有挑战性的工作。基于Web的系统测试与传统的软件测试不同，它不但需要检查和验证是否按照设计的要求运行，而且还要测试系统在不同用户的浏览器端的显示是否合适。重要的是，还要从最终用户的角度进行安全性和可用性测试。然而，Internet和Web媒体的不可预见性使测试基于Web的系统变得困难。因此，我们必须为测试和评估复杂的基于Web的系统...&nbsp;&nbsp;<a href='http://www.cnitblog.com/seeyeah/archive/2007/02/03/22631.html'>阅读全文</a><img src ="http://www.cnitblog.com/seeyeah/aggbug/22631.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/seeyeah/" target="_blank">KiMoGiGi</a> 2007-02-03 22:11 <a href="http://www.cnitblog.com/seeyeah/archive/2007/02/03/22631.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title> web.config中的session配置详解 </title><link>http://www.cnitblog.com/seeyeah/archive/2007/01/20/22089.html</link><dc:creator>KiMoGiGi</dc:creator><author>KiMoGiGi</author><pubDate>Fri, 19 Jan 2007 16:34:00 GMT</pubDate><guid>http://www.cnitblog.com/seeyeah/archive/2007/01/20/22089.html</guid><wfw:comment>http://www.cnitblog.com/seeyeah/comments/22089.html</wfw:comment><comments>http://www.cnitblog.com/seeyeah/archive/2007/01/20/22089.html#Feedback</comments><slash:comments>5</slash:comments><wfw:commentRss>http://www.cnitblog.com/seeyeah/comments/commentRss/22089.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/seeyeah/services/trackbacks/22089.html</trackback:ping><description><![CDATA[打开某个应用程序的配置文件Web.config后，我们会发现以下这段： <br /><br /><div style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 95%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid"><div><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">  sessionState <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />　　</span><span style="COLOR: #ff0000">mode</span><span style="COLOR: #0000ff">="InProc"</span><span style="COLOR: #ff0000"> <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />　　stateConnectionString</span><span style="COLOR: #0000ff">="tcpip=127.0.0.1:42424"</span><span style="COLOR: #ff0000"> <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />　　sqlConnectionString</span><span style="COLOR: #0000ff">="data source=127.0.0.1;Trusted_Connection=yes"</span><span style="COLOR: #ff0000"> <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />　　cookieless</span><span style="COLOR: #0000ff">="false"</span><span style="COLOR: #ff0000"> <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />　　timeout</span><span style="COLOR: #0000ff">="20"</span><span style="COLOR: #ff0000">  <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">/&gt;</span></div></div>  <br />　　这一段就是配置应用程序是如何存储Session信息的了。我们以下的各种操作主要是针对这一段配置展开。让我们先看看这一段配置中所包含的内容的意思。sessionState节点的语法是这样的： <br /><br /><div style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 95%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid"><div><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">  sessionState </span><span style="COLOR: #ff0000">mode</span><span style="COLOR: #0000ff">="Off|InProc|StateServer|SQLServer"</span><span style="COLOR: #ff0000"> <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />              cookieless</span><span style="COLOR: #0000ff">="true|false"</span><span style="COLOR: #ff0000"> <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />              timeout</span><span style="COLOR: #0000ff">="number of minutes"</span><span style="COLOR: #ff0000"> <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />              stateConnectionString</span><span style="COLOR: #0000ff">="tcpip=server:port"</span><span style="COLOR: #ff0000"> <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />              sqlConnectionString</span><span style="COLOR: #0000ff">="sql connection string"</span><span style="COLOR: #ff0000"> <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />              stateNetworkTimeout</span><span style="COLOR: #0000ff">="number of seconds"</span><span style="COLOR: #ff0000"> <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #000000"> </span></div></div>  <br /><br />必须有的属性是 <br /><br />属性 选项 描述  <br />mode  设置将Session信息存储到哪里  <br /> Off 设置为不使用Session功能  <br /> InProc 设置为将Session存储在进程内，就是ASP中的存储方式，这是默认值。  <br /> StateServer 设置为将Session存储在独立的状态服务中。  <br /> SQLServer 设置将Session存储在SQL Server中。  <br /><br />可选的属性是： <br /><br />属性 选项 描述  <br />cookieless  设置客户端的Session信息存储到哪里  <br /> ture 使用Cookieless模式  <br /> false 使用Cookie模式，这是默认值。  <br />timeout  设置经过多少分钟后服务器自动放弃Session信息。默认为20分钟  <br />stateConnectionString  设置将Session信息存储在状态服务中时使用的服务器名称和端口号，例如："tcpip=127.0.0.1:42424”。当mode的值是StateServer是，这个属性是必需的。  <br />sqlConnectionString  设置与SQL Server连接时的连接字符串。例如"data source=localhost;Integrated Security=SSPI;Initial Catalog=northwind"。当mode的值是SQLServer时，这个属性是必需的。  <br />stateNetworkTimeout  设置当使用StateServer模式存储Session状态时，经过多少秒空闲后，断开Web服务器与存储状态信息的服务器的TCP/IP连接的。默认值是10秒钟。  <br /><br />ASP.NET中客户端Session状态的存储 <br />　　在我们上面的Session模型简介中，大家可以发现Session状态应该存储在两个地方，分别是客户端和服务器端。客户端只负责保存相应网站的SessionID，而其他的Session信息则保存在服务器端。在ASP中，客户端的SessionID实际是以Cookie的形式存储的。如果用户在浏览器的设置中选择了禁用Cookie，那末他也就无法享受Session的便利之处了，甚至造成不能访问某些网站。为了解决以上问题，在ASP.NET中客户端的Session信息存储方式分为：Cookie和Cookieless两种。 <br /><br />　　ASP.NET中，默认状态下，在客户端还是使用Cookie存储Session信息的。如果我们想在客户端使用Cookieless的方式存储Session信息的方法如下： <br /><br />　　找到当前Web应用程序的根目录，打开Web.Config文件，找到如下段落： <br /><br /><div style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 95%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid"><div><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">  sessionState <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />　　</span><span style="COLOR: #ff0000">mode</span><span style="COLOR: #0000ff">="InProc"</span><span style="COLOR: #ff0000"> <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />　　stateConnectionString</span><span style="COLOR: #0000ff">="tcpip=127.0.0.1:42424"</span><span style="COLOR: #ff0000"> <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />　　sqlConnectionString</span><span style="COLOR: #0000ff">="data source=127.0.0.1;Trusted_Connection=yes"</span><span style="COLOR: #ff0000"> <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />　　cookieless</span><span style="COLOR: #0000ff">="false"</span><span style="COLOR: #ff0000"> <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />　　timeout</span><span style="COLOR: #0000ff">="20"</span><span style="COLOR: #ff0000">  <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #000000">  <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /></span></div></div><br />　　这段话中的cookieless="false"改为：cookieless="true"，这样，客户端的Session信息就不再使用Cookie存储了，而是将其通过URL存储。关闭当前的IE，打开一个新IE，重新访问刚才的Web应用程序，就会看到类似下面的样子： <br /><br /><br /><br />　　其中，http://localhost/MyTestApplication/(ulqsek45heu3ic2a5zgdl245)/default.aspx中黑体标出的就是客户端的Session ID。注意，这段信息是由IIS自动加上的，不会影响以前正常的连接。 <br /><br />ASP.NET中服务器端Session状态的存储 <br />准备工作 <br /><br />　　为了您能更好的体验到实验现象，您可以建立一个叫做SessionState.aspx的页面，然后把以下这些代码添加到&lt;  body&gt;&lt;  /body&gt;中。 <br /><br /><br /><div style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 95%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid"><div><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">  scriptrunat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"> <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />Sub Session_Add(sender As Object, e As EventArgs) <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />　  Session("MySession") = text1.Value <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />　  span1.InnerHtml = "Session data updated! </span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">  P</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000">Your session contains: </span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">  font </span><span style="COLOR: #ff0000">color</span><span style="COLOR: #0000ff">=red</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000">" &amp; 　　　　　　　　　　  Session("MySession").ToString() &amp; "</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">  /font</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000">" <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />End Sub <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /><br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />Sub CheckSession(sender As Object, eAs EventArgs) <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />　  If (Session("MySession")Is Nothing) Then <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />　　　 span1.InnerHtml = "NOTHING, SESSION DATA LOST!" <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />　  Else <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />　　　 span1.InnerHtml = "Your session contains: </span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">  font </span><span style="COLOR: #ff0000">color</span><span style="COLOR: #0000ff">=red</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000">" &amp; 　　　　　　　　　　　　 Session("MySession").ToString() &amp; "</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">  /font</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000">" <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />End If <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />End Sub <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /></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 alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">  formrunat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="Form2"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"> <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />　  </span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">  inputid</span><span style="COLOR: #0000ff">="text1"</span><span style="COLOR: #ff0000">type</span><span style="COLOR: #0000ff">="text"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #ff0000">name</span><span style="COLOR: #0000ff">="text1"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"> <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />　  </span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">  inputtype</span><span style="COLOR: #0000ff">="submit"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #ff0000">OnServerClick</span><span style="COLOR: #0000ff">="Session_Add"</span><span style="COLOR: #ff0000"> <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />　　　　　 value</span><span style="COLOR: #0000ff">="Add to Session State"</span><span style="COLOR: #ff0000"> id</span><span style="COLOR: #0000ff">="Submit1"</span><span style="COLOR: #ff0000">name</span><span style="COLOR: #0000ff">="Submit1"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"> <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />　  </span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">  inputtype</span><span style="COLOR: #0000ff">="submit"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #ff0000">OnServerClick</span><span style="COLOR: #0000ff">="CheckSession"</span><span style="COLOR: #ff0000"> <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />　　　　　 value</span><span style="COLOR: #0000ff">="View Session State"</span><span style="COLOR: #ff0000"> id</span><span style="COLOR: #0000ff">="Submit2"</span><span style="COLOR: #ff0000">name</span><span style="COLOR: #0000ff">="Submit2"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"> <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">  /form</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"> <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">  hrsize</span><span style="COLOR: #0000ff">="1"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"> <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">  fontsize</span><span style="COLOR: #0000ff">="6"</span><span style="COLOR: #0000ff">&gt;&lt;</span><span style="COLOR: #800000">  spanid</span><span style="COLOR: #0000ff">="span1"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #ff0000"> </span><span style="COLOR: #0000ff">/&gt;&lt;</span><span style="COLOR: #800000">  /font</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000">  <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /></span></div></div><br />　　这个SessionState.aspx的页面可以用来测试在当前的服务器上是否丢失了Session信息。 <br /><br />将服务器Session信息存储在进程中 <br />　　让我们来回到Web.config文件的刚才那段段落中： <br /><br /><div style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 95%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid"><div><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">  sessionState <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />　　</span><span style="COLOR: #ff0000">mode</span><span style="COLOR: #0000ff">="InProc"</span><span style="COLOR: #ff0000"> <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />　　stateConnectionString</span><span style="COLOR: #0000ff">="tcpip=127.0.0.1:42424"</span><span style="COLOR: #ff0000"> <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />　　sqlConnectionString</span><span style="COLOR: #0000ff">="data source=127.0.0.1;Trusted_Connection=yes"</span><span style="COLOR: #ff0000"> <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />　　cookieless</span><span style="COLOR: #0000ff">="false"</span><span style="COLOR: #ff0000"> <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />　　timeout</span><span style="COLOR: #0000ff">="20"</span><span style="COLOR: #ff0000">  <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #000000">  <br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /></span></div></div>　　当mode的值是InProc时，说明服务器正在使用这种模式。 <br /><br />　　这种方式和以前ASP中的模式一样，就是服务器将Session信息存储在IIS进程中。当IIS关闭、重起后，这些信息都会丢失。但是这种模式也有自己最大好处，就是性能最高。应为所有的Session信息都存储在了IIS的进程中，所以IIS能够很快的访问到这些信息，这种模式的性能比进程外存储Session信息或是在SQL Server中存储Session信息都要快上很多。这种模式也是ASP.NET的默认方式。 <br /><br />　　好了，现在让我们做个试验。打开刚才的SessionState.aspx页面，随便输入一些字符，使其存储在Session中。然后，让我们让IIS重起。注意，并不是使当前的站点停止再开始，而是在IIS中本机的机器名的节点上点击鼠标右键，选择重新启动IIS。(想当初使用NT4时，重新启动IIS必须要重新启动计算机才行，微软真是@#$%^&amp;)返回到SessionState.aspx页面中，检查刚才的Session信息，发现信息已经丢失了。 <br /><br />将服务器Session信息存储在进程外 <br />　　首先，让我们来打开管理工具-&gt;服务，找到名为：ASP.NET State Service的服务，启动它。实际上，这个服务就是启动一个要保存Session信息的进程。启动这个服务后，你可以从Windows任务管理器-&gt;进程中看到一个名为aspnet_state.exe的进程，这个就是我们保存Session信息的进程。 <br /><br />　　然后，回到Web.config文件中上述的段落中，将mode的值改为StateServer。保存文件后的重新打开一个IE，打开SessionState.aspx页面，保存一些信息到Session中。这时，让我们重起IIS，再回到SessionState.aspx页面中查看刚才的Session信息，发现没有丢失。 <br /><br />　　实际上，这种将Session信息存储在进程外的方式不光指可以将信息存储在本机的进程外，还可以将Session信息存储在其他的服务器的进程中。这时，不光需要将mode的值改为StateServer，还需要在stateConnectionString中配置相应的参数。例如你的计算你是192.168.0.1，你想把Session存储在IP为192.168.0.2的计算机的进程中，就需要设置成这样：stateConnectionString="tcpip=192.168.0.2:42424"。当然，不要忘记在192.168.0.2的计算机中装上.NET Framework，并且启动ASP.NET State Services服务。 <br /><br />将服务器Session信息存储在SQL Server中 <br />　　首先，还是让我们来做一些准备工作。启动SQL Server和SQL Server代理服务。在SQL Server中执行一个叫做InstallSqlState.sql的脚本文件。这个脚本文件将在SQL Server中创建一个用来专门存储Session信息的数据库，及一个维护Session信息数据库的SQL Server代理作业。我们可以在以下路径中找到那个文件： <br /><br />[system drive]\winnt\Microsoft.NET\Framework\[version]\  <br />　　然后打开查询分析器，连接到SQL Server服务器，打开刚才的那个文件并且执行。稍等片刻，数据库及作业就建立好了。这时，你可以打开企业管理器，看到新增了一个叫ASPState的数据库。但是这个数据库中只是些存储过程，没有用户表。实际上Session信息是存储在了tempdb数据库的ASPStateTempSessions表中的，另外一个ASPStateTempApplications表存储了ASP中Application对象信息。这两个表也是刚才的那个脚本建立的。另外查看管理-&gt;SQL Server代理-&gt;作业，发现也多了一个叫做ASPState_Job_DeleteExpiredSessions的作业，这个作业实际上就是每分钟去ASPStateTempSessions表中删除过期的Session信息的。 <br /><br />　　接着，我们返回到Web.config文件，修改mode的值改为SQLServer。注意，还要同时修改sqlConnectionString的值，格式为： <br /><br />sqlConnectionString="data source=localhost; Integrated Security=SSPI;" <br />　　其中data source是指SQL Server服务器的IP地址，如果SQL Server与IIS是一台机子，写127.0.0.1就行了。Integrated Security=SSPI的意思是使用Windows集成身份验证，这样，访问数据库将以ASP.NET的身份进行，通过如此配置，能够获得比使用userid=sa;password=口令的SQL Server验证方式更好的安全性。当然，如果SQL Server运行于另一台计算机上，你可能会需要通过Active Directory域的方式来维护两边验证的一致性。 <br /><br />　　同样，让我们做个试验。向SessionState.aspx中添加Session信息，这时发现Session信息已经存在SQL Server中了，即使你重起计算机，刚才的Session信息也不会丢失。现在，你已经完全看见了Session信息到底是什么样子的了，而且又是存储在SQL Server中的，能干什么就看你的发挥了，哈哈。 <br /><br />总结 <br />　　通过这篇文章，你可以看到在Session的管理和维护上，ASP.NET比ASP有了很大的进步，我们可以更加随意的挑选适合的方法了。对于企业级的应用来说，这无疑对于服务器的同步、服务器的稳定性、可靠性都是有利的。相信在强大的微软支持下，新一代的电子商务平台将会搭建的更好！ <br /><br />　　同时，大家也会发现，在这个整个技术中包括了操作系统、Web服务及数据库多种技术的整合。我相信，也许Windows没有Unix稳定，IIS没有Apache稳定，SQL Server也没有Oracle强大，但是，谁可以将他们如此完美的联动到一起呢？所以说，虽然微软每一方面都不是太强，但是如果把微软的东西都整合到一起，谁敢说他不强大呢？微软就是微软！<img src ="http://www.cnitblog.com/seeyeah/aggbug/22089.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/seeyeah/" target="_blank">KiMoGiGi</a> 2007-01-20 00:34 <a href="http://www.cnitblog.com/seeyeah/archive/2007/01/20/22089.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[转]Session常见问题 </title><link>http://www.cnitblog.com/seeyeah/archive/2007/01/04/21526.html</link><dc:creator>KiMoGiGi</dc:creator><author>KiMoGiGi</author><pubDate>Thu, 04 Jan 2007 15:44:00 GMT</pubDate><guid>http://www.cnitblog.com/seeyeah/archive/2007/01/04/21526.html</guid><wfw:comment>http://www.cnitblog.com/seeyeah/comments/21526.html</wfw:comment><comments>http://www.cnitblog.com/seeyeah/archive/2007/01/04/21526.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/seeyeah/comments/commentRss/21526.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/seeyeah/services/trackbacks/21526.html</trackback:ping><description><![CDATA[
		<p>问：为什么Session在有些机器上偶尔会丢失？<br />答：可能和机器的环境有关系，比如：防火墙或者杀毒软件等，尝试关闭防火墙。</p>
		<p>问：为什么当调用Session.Abandon时并没有激发Session_End方法？<br />答：首先Session_End方法只支持InProc（进程内的）类型的Session。其次要激发Session_End方法，必须存在Session（即系统中已经使用Session了），并且至少要完成一次请求（在这次请求中会调用该方法）。</p>
		<p>问：为什么当我在InProc模式下使用Session会经常丢失？<br />答：该问题通常是由于应用程序被回收导致的，因为当使用进程内Session时，Session是保存在aspnet_wp进程中，当该进程被回收Session自然也就没有了，确定该进程是否被回收可以通过查看系统的事件查看器获得信息。<br /> 具体信息请参考：<br /> Session variables are lost intermittently in ASP.NET applications<br /> <a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q316148"><font color="#ff9b0d">http://support.microsoft.com/default.aspx?scid=kb;en-us;Q316148</font></a><br /> 在1.0的时候也有一个bug会导致工作进程被回收并重启，该bug已经在1.1和sp2中修复。<br /> 关于该bug的详细信息请参考：<br /> ASP.NET Worker Process (Aspnet_wp.exe) Is Recycled Unexpectedly.<br /> <a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q321792"><font color="#ff9b0d">http://support.microsoft.com/default.aspx?scid=kb;en-us;Q321792</font></a></p>
		<p>问：为什么当Session超时或者Abandoned后，新Session的ID和原来的相同？<br />答：因为SessionID是保存在客户端浏览器的实例里，当Session超时在服务器重新建立Session时，将使用浏览器传来的SessionID，所以当Session超时后，再重新建立后SessionID并不变。</p>
		<p>问：为什么每次请求的SessionID都不相同？<br />答：该问题可能是没有在Session里面保存任何信息引起的，即程序中任何地方都没有使用Session。当Session中保存信息之后SessionID将一直和浏览器相关，此时的SessionID将不会在变化。</p>
		<p>问：ASP和ASP.NET之间是否可以共享Session？<br />答：可以。但是这是一个比较复杂的过程，微软提供了官方的解决方案，请参考：<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/ConvertToASPNET.asp"><font color="#ff9b0d">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/ConvertToASPNET.asp</font></a></p>
		<p>问：什么类型的对象可以保存在Session里？<br />答：这依赖使用的Session的模式，当使用的是进程内（InProc）的Session那么可以轻松的保存任何对象。如果你使用了非InProc的模式，则只能保存可以序列化和反序列化的对象，如果此时保存的对象不支持序列化，则不能保存到这种模式（非InProc）的Session里。</p>
		<p>问：为什么在Session_End中不能使用Response.Redirect和Server.Transfer方法跳转页面？<br />答：Session_End是一个在服务器内部激发的事件处理函数。它是基于一个服务器内部的计时器的，在激发该事件时服务器上并没有相关的HttpRequest对象，因此此时并不能使用Response.Redirect和Server.Transfer方法。</p>
		<p>问：在Session_End中是否可以获得HttpContext对象？<br />答：不行，因为这个事件并没有和任何的请求（Request）相关联，没有基于请求的上下文。</p>
		<p>问：在Web Service中该如何使用Session？<br />答：为了在Web Service中使用Session，需要在Web Service的调用方做一些额外的工作，必须保存和存储调用Web Service时使用的Cookie。详细信息请参考MSDN文档的HttpWebClientProtocol.CookieContainer属性。然而，如果你使用代理服务器访问Web Service由于框架的限制，两者不能共享Session。</p>
		<p>问：在自定义自己的HttpHandler的时候，为什么不能使用Session？<br />答：在实现自己的HttpHandler的时候，如果希望使用Session必须实现下面的两个标记接口中的一个： IRequiresSessionState和IReadOnlySessionState，这些接口没有任何方法需要实现，只是一个标记接口和使用 INamingContainer接口的方法一样。</p>
		<p>问：当我使用webfarm时，当我重定向到其他的Web服务器时Session为什么会丢失？<br />答：详细信息请参考：<br /> PRB: Session State Is Lost in Web Farm If You Use SqlServer or StateServer Session Mode<br /> <a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;325056"><font color="#ff9b0d">http://support.microsoft.com/default.aspx?scid=kb;en-us;325056</font></a></p>
		<p>问：为什么我的Session在Application_OnAcquireRequestState方法中无效？<br />答：Session只有在HttpApplication.AcquireRequestState事件调用以后才会有效。<br /> 详细信息请参考：<br /> <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconhandlingpublicevents.asp"><font color="#ff9b0d">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconhandlingpublicevents.asp</font></a></p>
		<p>问：如果使用了cookieless，我该如何从HTTP页面定向到HTTPS？<br />答：请尝试下面的方法：<br /> String originalUrl = "/fxtest3/sub/foo2.aspx";<br /> String modifiedUrl = "<a href="https://localhost/"><font color="#ff9b0d">https://localhost</font></a>" + Response.ApplyAppPathModifier(originalUrl);<br /> Response.Redirect(modifiedUrl);</p>
		<p>问：Session在global.asax中的那些事件中有效？<br />答：Session只有在AcquireRequestState事件之后有效，该事件之后的事件都可以使用Session。</p>
		<p>
				<br />问：如何获得当前Session中保存的所有对象？<br />答：可以通过遍历所有的Session.Keys来获得。代码如下：<br />ArrayList sessionCollection = new ArrayList();<br />foreach (string strKey in Session.Keys){<br />  sessionCollection.Add(Session[strKey]);<br />}<br /> <br />问：是否可以在不同的应用程序中共享Session？<br />答：不能直接共享。可以参考如何在ASP和ASP.NET之间共享Session。</p>
		<p>问：Session.Abandon和Session.Clear有何不同？<br />答：主要的不同之处在于当使用Session.Abandon时，会调用Session_End方法（InProc模式下）。当下一个请求到来时将激发 Session_Start方法。而Session.Clear只是清除Session中的所有数据并不会中止该Session，因此也不会调用那些方法。<br /> <br />问：为了可以顺序访问Session的状态值，Session是否提供了锁定机制？<br />答：Session实现了Reader/Writer的锁机制：<br /> 当页面对Session具有可写功能（即页面有&lt;%@ Page EnableSessionState="True" %&gt;标记），此时直到请求完成该页面的Session持有一个写锁定。<br /> 当页面对Session具有只读功能（即页面有&lt;%@ Page EnableSessionState="ReadOnly" %&gt;标记），此时知道请求完成该页面的Session持有一个读锁定。<br /> 读锁定将阻塞一个写锁定；读锁定不会阻塞读锁定；写锁定将阻塞所有的读写锁定。这就是为什么两个框架中的同一个页面都去写同一个Session时，其中一个要等待另一个（稍快的那个）完成后，才开始写。</p>
		<p>问：Session平滑超时意味着什么？<br />答：Session平滑超时意味着只要你的页面访问（使用）了Session，超时时间将被刷新（可以理解为重新计时），即从该页面请求开始，将重新计算超时时间。但是，该页面不能禁用Session。它会自动的访问当前页面的Session，刷新超时时间。<br /> <br />问：在global.asax中的事件处理函数中Session为什么无效？<br />答：依赖于在哪个事件处理函数中使用Session，Session在AcquireRequestState事件之后才有效，该事件之后的所有事件处理函数都可以使用Session，之前的则不能。</p>
		<p>问：当我写一个依赖于当前应用的Session的组件时，为什么不能直接使用Session["Key"]获得其值？<br />答：Session["Key"]实际上是this.Session["Key"]，它是作为Page的一个属性提供的，所以在你的组件中不能直接使用这个属性。你可以通过下面的方式使用Session：<br /> HttpContext.Current.Session["Key"] = "My Seesion Value";</p>
		<p>问：当我使用InProc模式保存Session时，此时的Session是保存在哪里？<br />答：不同的IIS的处理方式不同，<br /> 当使用的是IIS5的时候Session是保存在aspnet_wp.exe的进程空间里的。<br /> 当使用的是IIS6时，默认情况下所有的应用程序共享应用程序池，Session保存在w3wp.exe的进程空间中。</p>
		<p>问：Session的超时设置是分钟还是秒？<br />答：是分钟，默认为20分钟。</p>
		<p>问：当页面出现错误后我的Session是否将被保存？我需要在Session_End中处理一些清理工作，但是失败了，为什么？<br />答： Session_End只有在Session运行在InProc模式下才会被执行。Session_End使用的帐号是运行aspnet_wp工作<nobr>进程</nobr>的帐号（这个可以在machine.config中设置）。因此，如果在Session_End方法里，使用集成安全性链接到SQL，它将使用 aspnet_wp进程的帐号打开链接，此时成功与否则依赖于你的SQL的安全性设置。<br /> <br />问：为什么当我设置cookieless为true是我在重定向的时候会丢失Session？<br />答：当使用cookieless时，你必须使用相对路径替换程序中的绝对路径，如果使用绝对路径ASP.NET将无法在URL<nobr>中保</nobr>存SessionID。<br /> 例如：将\myDir\mySubdir\default.aspx换成..\default.aspx即可。</p>
		<p>问：如何将SortedList存储到Session或者Cache里？<br />答：请参考下面的方法：<br /> SortedList x = new SortedList();<br /> x.Add("Key1", "ValueA");<br /> x.Add("Key2", "ValueB");<br /> 保存到Session中:<br /> Session["SortedList1"] = x;<br /> 使用下面方法获得之：<br /> SortedList y = (SortedList) Session["SortedList1"];<br /> Chahe则同理。<br /> <br />问：我为什么会获得这样的错误信息“Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive”？<br />答：这个问题可能在一个已经安装了Microsoft Visual Studio .NET开发环境的机器上，再安装Window Sharepoint Server（WSS）后出现。<br /> WSS ISAPI过滤器会处理所有的请求。当你通过虚拟目录浏览一个ASP.NET的应用程序时，ISAPI过滤器不会给文件夹目录分配URL。<br /> 解决方法是：不要再安装了WSS的机器上使用Session。<br /> 详细信息请参考：<br /> Session state cannot be used in ASP.NET with Windows SharePoint Services<br /> <a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;837376"><font color="#ff9b0d">http://support.microsoft.com/default.aspx?scid=kb;en-us;837376</font></a></p>
		<p>问：如何删除Session变量？<br />答：想要删除Session变量可以使用HttpSessionState.Remove()方法。<br /> <br />问：是否有办法知道应用程序的Session在运行时占用了多少内存？<br />答：没有。目前这个值时无法考证的，至少我现在还没有看到这方面的资料。但是可以通过性能监视器以及程序代码大概估算出来一个值。<br /> <br />问：当页面中是否了frameset，发现在每个frame中显示页面的SessionID在第一次请求时都不相同，为什么？<br />答：原因是你的frameset是放在一个htm页面上而不是ASPX页面。<br />  在一般情况下，如果frameset是aspx页面，当你请求页面时，它首先将请求发送到Web服务器，此时已经获得了SessionID，接着<nobr>浏览器</nobr>会分别请求Frame中的其他页面，这样所有页面的SessionID就是一样的，就是FrameSet页面的SessionID。<br /> 然而如果你使用Html页面做FrameSet页面，第一个请求将是HTML页面，当该页面从服务器上返回是并没有任何Session产生，接着浏览器会请求 Frame里面的页面，这样这些页面都会产生自己的SessionID，所以在这种情况下就会出现这种问题。当你重新刷新页面时，SessionID就会一样，并且是最后一个请求页面的SessionID。<br /> <br />问：是否可以将不同应用程序的Session保存在相同的SQL Server服务器的不同数据库上。<br />答：可以，请参考：<br /> FIX: Using one SQL database for all applications for SQL Server session state may cause a bottleneck<br /> <a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;836680"><font color="#ff9b0d">http://support.microsoft.com/default.aspx?scid=kb;en-us;836680</font></a></p>
		<p>问：在Session_End是我是否可以获得有效的HttpSessionState和HttpContext对象？<br />答：你可以在这个方法中获得HttpSessionState对象，可以直接使用Session来访问即可。但是不能获得HttpContext对象，因为该<nobr>事件</nobr>并没有和任何请求相关联，因此不存在上下文对象。</p>
		<p>问：在SQLServer模式下使用Session，为什么我的Session不过期？<br />答：在SqlServer模式下，Session的过期是通过SQL Agent的注册工作完成的，请检查你的SQL Agent是否运行？<br /> <br />问：当我设置EnableSessionState为“ReadOnly”后，但是我在InProc模式下依然可以修改Session的值，这是为什么？<br />答：即使EnableSessionState标示为ReadOnly，但是在InProc模式下用户依然可以编辑Session。唯一不同的是，在请求过程中Session将不会被锁住。</p>
		<p>问：我如何才能避免在链接SQL时指定密码？<br />答：使用信任链接或者使用加密的链接串。有关这方面的详细信息请参考：<br /> How To Use the ASP.NET Utility to Encrypt Credentials and Session State Connection Strings<br /> <a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;329290"><font color="#ff9b0d">http://support.microsoft.com/default.aspx?scid=kb;en-us;329290</font></a></p>
		<p>问：我在我自己的类中该如何使用Session呢？<br />答：可以使用HttpContext.Current.Session方式使用，具体方法如下：<br /> HttpContext.Current.Session["SessionKey"] = "SessionValue";<br /> 类似的你还可以使用这种方式使用Application对象。<br /> </p>
		<p>问：为什么在切换成SQLServer模式后我的请求被挂起了？<br />答：检查在Session里面是否都保存的是可以保存在SQLServer模式下的对象，即这些对象必须支持<nobr>序列</nobr>化。<br /> </p>
		<p>问：当Session设置成cookieless后会有什么影响？<br />答：当把cookieless设置成true时，主要会有下面的约束：<br /> 1、在<nobr>页面</nobr>中不能使用绝对链接<br /> 2、在应用程序中在除了Http和Https之间的切换时需要完成一些其他的步骤。<br /> 如果发送一个链接给其他人，此时的URL里面将包含Session ID的信息，所以两个人将公用一个Session。</p>
		<p>问：是否可以将Session保存在数据库中？<br />答：当然可以，详细信息请参考：<a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;311209"><font color="#ff9b0d">http://support.microsoft.com/default.aspx?scid=kb;en-us;311209</font></a></p>
<img src ="http://www.cnitblog.com/seeyeah/aggbug/21526.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/seeyeah/" target="_blank">KiMoGiGi</a> 2007-01-04 23:44 <a href="http://www.cnitblog.com/seeyeah/archive/2007/01/04/21526.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>让您的Ajax应用加载数据时界面友好</title><link>http://www.cnitblog.com/seeyeah/archive/2006/12/03/19877.html</link><dc:creator>KiMoGiGi</dc:creator><author>KiMoGiGi</author><pubDate>Sat, 02 Dec 2006 17:07:00 GMT</pubDate><guid>http://www.cnitblog.com/seeyeah/archive/2006/12/03/19877.html</guid><wfw:comment>http://www.cnitblog.com/seeyeah/comments/19877.html</wfw:comment><comments>http://www.cnitblog.com/seeyeah/archive/2006/12/03/19877.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/seeyeah/comments/commentRss/19877.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/seeyeah/services/trackbacks/19877.html</trackback:ping><description><![CDATA[
		<font size="2">Ajax火啊，火到了居然Loading Icons都有很多人专门提供的地步。下面是我同事给我介绍的一些提供Ajax Activity Indicators的网站，共享给大家，以便让我们的Ajax应用具有更好的用户体验。<br /><br />    </font>
		<a href="http://www.ajaxload.info/">
				<font size="2">http://www.ajaxload.info/</font>
		</a>
		<br />
		<font size="2">    <img height="177" alt="AjaxLoad.png" src="http://www.cnblogs.com/images/cnblogs_com/birdshome/NormalArticle/2006/AjaxLoad.png" width="525" border="0" /><br />    // 可以自己根据需求创建Ajax Indicators，不过动态效果都是转圈圈@_@<br /><br /><br />    </font>
		<a href="http://mentalized.net/activity-indicators/">
				<font size="2">http://mentalized.net/activity-indicators/</font>
		</a>
		<br />
		<font size="2">    <img height="239" alt="ActivityIndicators.png" src="http://www.cnblogs.com/images/cnblogs_com/birdshome/NormalArticle/2006/ActivityIndicators.png" width="479" border="0" /><br /><br /><br />    </font>
		<a href="http://www.napyfab.com/ajax-indicators/">
				<font size="2">http://www.napyfab.com/ajax-indicators/</font>
		</a>
		<br />
		<font size="2">    <img height="275" alt="AjaxIndicators.png" src="http://www.cnblogs.com/images/cnblogs_com/birdshome/NormalArticle/2006/AjaxIndicators.png" width="550" border="0" /><br />    // 这个站点的样式比较丰富，推荐哦!~<br /></font>
<img src ="http://www.cnitblog.com/seeyeah/aggbug/19877.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/seeyeah/" target="_blank">KiMoGiGi</a> 2006-12-03 01:07 <a href="http://www.cnitblog.com/seeyeah/archive/2006/12/03/19877.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>清除缓存</title><link>http://www.cnitblog.com/seeyeah/archive/2006/10/15/17985.html</link><dc:creator>KiMoGiGi</dc:creator><author>KiMoGiGi</author><pubDate>Sun, 15 Oct 2006 03:10:00 GMT</pubDate><guid>http://www.cnitblog.com/seeyeah/archive/2006/10/15/17985.html</guid><wfw:comment>http://www.cnitblog.com/seeyeah/comments/17985.html</wfw:comment><comments>http://www.cnitblog.com/seeyeah/archive/2006/10/15/17985.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/seeyeah/comments/commentRss/17985.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/seeyeah/services/trackbacks/17985.html</trackback:ping><description><![CDATA[
		<p> //CleanClientCache  清除客户端缓存<br />    #region<br />    protected void CleanClientCache()<br />    {<br />        StringBuilder str = new StringBuilder();<br />        str.Append("&lt;meta http-equiv=\"Expires\" content=\"0\"&gt;");<br />        str.Append("&lt;meta http-equiv=\"Cache-Control\" content=\"no-cache\"&gt;");<br />        str.Append("&lt;meta http-equiv=\"Pragma\" content=\"no-cache\"&gt;");<br />        HttpContext.Current.Response.Write(str.ToString());<br />    }<br />    #endregion</p>
		<p>    //CleanServerCache  清除服务器端缓存<br />    #region<br />    protected void CleanServerCache()<br />    {<br />        HttpContext.Current.Response.Buffer = true;<br />        HttpContext.Current.Response.ExpiresAbsolute = DateTime.Now.AddDays(-1);<br />        HttpContext.Current.Response.Cache.SetExpires(DateTime.Now.AddDays(-1));<br />        HttpContext.Current.Response.Expires = 0;<br />        HttpContext.Current.Response.CacheControl = "no-cache";<br />        HttpContext.Current.Response.Cache.SetNoStore();<br />    }<br />    #endregion<br /></p>
<img src ="http://www.cnitblog.com/seeyeah/aggbug/17985.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/seeyeah/" target="_blank">KiMoGiGi</a> 2006-10-15 11:10 <a href="http://www.cnitblog.com/seeyeah/archive/2006/10/15/17985.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>下载功能代码</title><link>http://www.cnitblog.com/seeyeah/archive/2006/10/15/17984.html</link><dc:creator>KiMoGiGi</dc:creator><author>KiMoGiGi</author><pubDate>Sun, 15 Oct 2006 03:09:00 GMT</pubDate><guid>http://www.cnitblog.com/seeyeah/archive/2006/10/15/17984.html</guid><wfw:comment>http://www.cnitblog.com/seeyeah/comments/17984.html</wfw:comment><comments>http://www.cnitblog.com/seeyeah/archive/2006/10/15/17984.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cnitblog.com/seeyeah/comments/commentRss/17984.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/seeyeah/services/trackbacks/17984.html</trackback:ping><description><![CDATA[
		<p>  public static void ReturnHTTPStream(string filePath)<br />        {<br />            FileInfo fi = new FileInfo(filePath);</p>
		<p>            //HttpContext.Current.Response.ClearHeaders();<br />            HttpContext.Current.Response.AppendHeader("Content-Disposition", "attachment;filename=" + fi.Name);<br />            HttpContext.Current.Response.AddHeader("Content-Length", fi.Length.ToString());<br />            HttpContext.Current.Response.AppendHeader("Last-Modified", fi.LastWriteTime.ToFileTime().ToString());<br />            HttpContext.Current.Response.AppendHeader("Location", HttpContext.Current.Request.Url.AbsoluteUri);</p>
		<p>            HttpContext.Current.Response.ContentType = GetResponseContentType(fi.Extension);</p>
		<p>            HttpContext.Current.Response.WriteFile(filePath);<br />            HttpContext.Current.Response.End();<br />        }<br />        private static string GetResponseContentType(string fileType)<br />        {<br />            string result;<br />            switch (fileType.ToLower())<br />            {<br />                case ".doc": result = "application/msword"; break;<br />                case ".xls":<br />                case ".xlt": result = "application/msexcel"; break;<br />                case ".txt": result = "text/plain"; break;<br />                case ".pdf": result = "application/pdf"; break;<br />                case ".ppt": result = "appication/powerpoint"; break;<br />                default: result = "application/unknown"; break;<br />            }<br />            return result;<br />        }</p>
<img src ="http://www.cnitblog.com/seeyeah/aggbug/17984.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/seeyeah/" target="_blank">KiMoGiGi</a> 2006-10-15 11:09 <a href="http://www.cnitblog.com/seeyeah/archive/2006/10/15/17984.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>常用的XPATH說明 </title><link>http://www.cnitblog.com/seeyeah/archive/2006/08/02/14543.html</link><dc:creator>KiMoGiGi</dc:creator><author>KiMoGiGi</author><pubDate>Wed, 02 Aug 2006 02:56:00 GMT</pubDate><guid>http://www.cnitblog.com/seeyeah/archive/2006/08/02/14543.html</guid><wfw:comment>http://www.cnitblog.com/seeyeah/comments/14543.html</wfw:comment><comments>http://www.cnitblog.com/seeyeah/archive/2006/08/02/14543.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/seeyeah/comments/commentRss/14543.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/seeyeah/services/trackbacks/14543.html</trackback:ping><description><![CDATA[
		<br />
		<table class="" title="" style="TEXT-INDENT: 8px" bordercolor="#008000" cellspacing="0" cellpadding="0" width="100%" summary="" border="1">
				<tbody>
						<tr>
								<td valign="top" width="100%" colspan="3">
										<div align="center">常用的XPATH</div>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>表達式</div>
								</td>
								<td valign="top" width="66%">
										<div>說明</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>//</div>
								</td>
								<td valign="top" width="66%">
										<div>表示返回XML文档中的所有符合查找准则的元素，而忽略文档中元素的位置级别</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>/</div>
								</td>
								<td valign="top" width="66%">
										<div>表示絕對路徑</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>News/Links/name</div>
								</td>
								<td valign="top" width="66%">
										<div>表示相對路徑</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>./</div>
								</td>
								<td valign="top" width="66%">
										<div>表示當前節點</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>../</div>
								</td>
								<td valign="top" width="66%">
										<div>表示父節點</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>*</div>
								</td>
								<td valign="top" width="66%">
										<div>表所所有元素</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>or</div>
								</td>
								<td valign="top" width="66%">
										<div>或</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>And </div>
								</td>
								<td valign="top" width="66%">
										<div>與</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>其它表達式</div>
								</td>
								<td valign="top" width="66%">
										<div>=，!=，&lt;，&gt;，&gt;=，&lt;=</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>Text()</div>
								</td>
								<td valign="top" width="66%">
										<div>文本</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>Node()</div>
								</td>
								<td valign="top" width="66%">
										<div>節點</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>
												<em>number</em>
												<b>last</b>() </div>
								</td>
								<td valign="top" width="66%">
										<div>
												<code>last</code> 函数返回一个数字，该数字等於从表达式求值上下文中的上下文大小 (即返回節點個數) </div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>
												<em>number</em>
												<b>position</b>() </div>
								</td>
								<td valign="top" width="66%">
										<div>position函数返回一个数字，该数字等於从表达式求值上下文中的上下文位置(即當前位置)</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>
												<em>number</em>
												<b>count</b>(<var>node-set</var>)<em></em></div>
								</td>
								<td valign="top" width="66%">
										<div>count 函数返回在参数node-set中节点的个数。</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>
												<em>node-set</em>
												<b>id</b>(<var>object</var>)<em></em></div>
								</td>
								<td valign="top" width="66%">
										<div> </div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>
												<em>string</em>
												<b>string</b>(<var>object?</var>)<em></em></div>
								</td>
								<td valign="top" width="66%">
										<div>string 函数将对象依下列各项转换成字符</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>
												<em>string</em>
												<b>concat</b>(<var>string</var>, <var>string</var>, <var>string</var>*)<em><b></b></em></div>
								</td>
								<td valign="top" width="66%">
										<div>concat 函数返回它的参数的联结。</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>
												<em>boolean</em>
												<b>starts-with</b>(<var>string</var>, <var>string</var>)<em></em></div>
								</td>
								<td valign="top" width="66%">
										<div>如果第一个字符串参数以第二个字符串参数起头，starts-with 函数返回真，否则，返回假。</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>
												<em>boolean</em>
												<b>contains</b>(<var>string</var>, <var>string</var>) </div>
								</td>
								<td valign="top" width="66%">
										<div>如果第一个字符串参数包含第二个字符串参数，contains 函数返回真，否则，返回假。</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>
												<em>string</em>
												<b>substring-before</b>(<var>string</var>, <var>string</var>)<em></em></div>
								</td>
								<td valign="top" width="66%">
										<div>substring-before 函数返回第一个字符串参数在第二个参数首次出现之前的子字符串，或者，如果第一个字符串参数不包含第二个字符串参数则返回空字符串。例如，substring-before("1999/04/01","/") 返回 1999。</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>
												<em>string</em>
												<b>substring-after</b>(<var>string</var>, <var>string</var>)<em></em></div>
								</td>
								<td valign="top" width="66%">
										<div>substring-after 函数返回第一个字符串参数在第二个参数首次出现之后的子字符串，或者，如果第一个字符串参数不包含第二个字符串参数则返回空字符串。例如， substring-after("1999/04/01","/") 返回 04/01，而 substring-after("1999/04/01","19") 返回 99/04/01。</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>
												<em>string</em>
												<b>substring</b>( <var>string</var> , <var>number</var> , <var>number</var>? )<em></em></div>
								</td>
								<td valign="top" width="66%">
										<div>substring 函数返回第一个字符串参数从第二个参数所指定的位置开始，以第三个参数为长度的子字符串。例如， substring("12345",2,3) 返回 "234"。如果没有第三个参数，则返回从第二个参数所指定的位置开始直到结束。例如， substring("12345",2) 返回"2345"。</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>
												<em>number</em>
												<b>string-length</b>( <var>string</var>? )<em></em></div>
								</td>
								<td valign="top" width="66%">
										<div>string-length 返回字符串中字符的个数。如果参数省略，则缺省为一个上下文节点再转换成字符串，也就是上下文节点的 字串值。 </div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>
												<em>string</em>
												<b>normalize-space</b>(<var>string</var>?)<em></em></div>
								</td>
								<td valign="top" width="66%">
										<div>normalize-space 函数返回空白符规范化 后的参数字符串，该规范化是清除领头及结尾的空白字以及用一个空白符替换连续的空白符。空白符字符与 XML 中的产生式 S 所允许的是一样的。如果参数省略，则缺省为一个上下文节点再转换成字符串，也就是上下文节点的 字串值。 </div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>
												<em>string</em>
												<b>translate</b>(<var>string</var>, <var>string</var>, <var>string</var>)<em></em></div>
								</td>
								<td valign="top" width="66%">
										<div>translate 函数返回第一个参数的字符串，其中有在第二个参数中出现的字符都被在第三个参数中相对应位置的字符所替换。例如，translate("bar","abc","ABC") 返回字符串 BAr。如果，第二个参数里的字符在第三个参数的相对应位置没有字符（因为第二个参数里的字符串比第三个参数的字符串长），那么，第一个参数里的那个字符将被移去。例如，translate("--aaa--","abc-","ABC") 返回 "AAA"。如果在第二个参数里的字符出现超过一次，那么，第一次的出现决定替换的字符。如果第三个参数里的字符串比第二个参数的字符串长， 那么，多余的字符将被忽略。</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>
												<em>boolean</em>
												<b>not</b>(<var>boolean</var>)<em></em></div>
								</td>
								<td valign="top" width="66%">
										<div>如果参数为真 not 函数返回真，否则返回假。</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>
												<em>boolean</em>
												<b>true</b>()<em></em></div>
								</td>
								<td valign="top" width="66%">
										<div>true 函数返回真。</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>
												<em>boolean</em>
												<b>false</b>()<em></em></div>
								</td>
								<td valign="top" width="66%">
										<div>The false 函数返回假。</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>
												<em>number</em>
												<b>number</b>(<var>object</var>?)<em></em></div>
								</td>
								<td valign="top" width="66%">
										<div>number 函数参数依下列各项转换成数字</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>
												<em>number</em>
												<b>sum</b>(<var>node-set</var>)<em></em></div>
								</td>
								<td valign="top" width="66%">
										<div>对於在参数节点集合的每个节点，sum 函数返回节点字串值转换成数字后的和。 </div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>
												<em>number</em>
												<b>floor</b>(<var>number</var>)<em></em></div>
								</td>
								<td valign="top" width="66%">
										<div>floor 函数返回不大於参数的整数的最大数 （最接近于正无穷大）</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>
												<em>number</em>
												<b>ceiling</b>(<var>number</var>)<em></em></div>
								</td>
								<td valign="top" width="66%">
										<div>ceiling 函数返回不小於参数的整数的最小数 （最接近于负无穷大</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>
												<em>number</em>
												<b>round</b>(<var>number</var>)<em></em></div>
								</td>
								<td valign="top" width="66%">
										<div>round 函数返回最接近于参数的整数。</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>//*</div>
								</td>
								<td valign="top" width="66%">
										<div>獲得所有節點</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>../*</div>
								</td>
								<td valign="top" width="66%">
										<div>獲得當前節點的父節點的所有節點</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>//Links</div>
								</td>
								<td valign="top" width="66%">
										<div>獲得所有的Links節點</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>//Links[name=”網易”]</div>
								</td>
								<td valign="top" width="66%">
										<div>獲得子節點name的文本為“網易”的所有Links節點</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>//Links[@id=”1”]</div>
								</td>
								<td valign="top" width="66%">
										<div>獲得屬性ID=1的所有Links節點</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>//*[name=”新浪”]</div>
								</td>
								<td valign="top" width="66%">
										<div>獲得子節點name的文本為“新浪”的所有節點</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>//*[@id=”1”]</div>
								</td>
								<td valign="top" width="66%">
										<div>獲得屬性ID=1的所有節點</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>//*[@id]</div>
								</td>
								<td valign="top" width="66%">
										<div>獲得存在屬生ID的所有節點點</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>//*[name]</div>
								</td>
								<td valign="top" width="66%">
										<div>獲得存在子節點name的所有節點</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>//Links[序號]</div>
								</td>
								<td valign="top" width="66%">
										<div>獲得返回的N個Links節點中的第序號個節點</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>//Links[1 or 2]</div>
								</td>
								<td valign="top" width="66%">
										<div>獲得返回的N個Links節點的中第一個和第二個節點</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>//*[name=”網易” and @id=”1”]</div>
								</td>
								<td valign="top" width="66%">
										<div>獲得所有子點節name的文本為“網易” 且自己的屬生id=“1”的節點</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>//text()</div>
								</td>
								<td valign="top" width="66%">
										<div>選擇所有的正文節點(即葉子節點)</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>//Links[position()=last()]</div>
								</td>
								<td valign="top" width="66%">
										<div>獲得返回的N個Links節點中的最後一個節點</div>
										<div>等同於//Links[last()]</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>//*[contains(name,”新”)]</div>
								</td>
								<td valign="top" width="66%">
										<div>獲得子節點name的文本中包含“新”的所有節點</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>//Links[1]</div>
								</td>
								<td valign="top" width="66%">
										<div>獲得返回的N個Links節點中的第一個節點</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>//Links[1]/name[1]</div>
								</td>
								<td valign="top" width="66%">
										<div>獲得第一個Links的第一個name節點</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>//Links//name</div>
								</td>
								<td valign="top" width="66%">
										<div>獲得所有Links節點下的所有name節點</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>//*[@id&gt;1]</div>
								</td>
								<td valign="top" width="66%">
										<div>獲得屬性ID&gt;1的所有節點</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>//*[number(@id)+1&gt;1]</div>
								</td>
								<td valign="top" width="66%">
										<div>獲得屬生ID的值加1&gt;1的所有節點</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>//*[number(text())&gt;1]</div>
								</td>
								<td valign="top" width="66%">
										<div>獲得文本節點的文本值大於1的所有節點</div>
								</td>
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top" width="33%">
										<div>//*[(number(text()) mode 2)=1]</div>
								</td>
								<td valign="top" width="66%">
										<div>獲得文本節點的文本值為基數的所有節點</div>
								</td>
								<td>
								</td>
						</tr>
				</tbody>
		</table>
<img src ="http://www.cnitblog.com/seeyeah/aggbug/14543.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/seeyeah/" target="_blank">KiMoGiGi</a> 2006-08-02 10:56 <a href="http://www.cnitblog.com/seeyeah/archive/2006/08/02/14543.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Colorful ToolTip</title><link>http://www.cnitblog.com/seeyeah/archive/2006/06/23/12755.html</link><dc:creator>KiMoGiGi</dc:creator><author>KiMoGiGi</author><pubDate>Fri, 23 Jun 2006 08:14:00 GMT</pubDate><guid>http://www.cnitblog.com/seeyeah/archive/2006/06/23/12755.html</guid><wfw:comment>http://www.cnitblog.com/seeyeah/comments/12755.html</wfw:comment><comments>http://www.cnitblog.com/seeyeah/archive/2006/06/23/12755.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/seeyeah/comments/commentRss/12755.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/seeyeah/services/trackbacks/12755.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 1								&lt;				html				&gt;																		  2																		&lt;				head				&gt;																		  3																		&lt;				title				&gt;		...&nbsp;&nbsp;<a href='http://www.cnitblog.com/seeyeah/archive/2006/06/23/12755.html'>阅读全文</a><img src ="http://www.cnitblog.com/seeyeah/aggbug/12755.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/seeyeah/" target="_blank">KiMoGiGi</a> 2006-06-23 16:14 <a href="http://www.cnitblog.com/seeyeah/archive/2006/06/23/12755.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>过长的文字部分自动变成省略号显示 </title><link>http://www.cnitblog.com/seeyeah/archive/2006/06/23/12746.html</link><dc:creator>KiMoGiGi</dc:creator><author>KiMoGiGi</author><pubDate>Fri, 23 Jun 2006 06:04:00 GMT</pubDate><guid>http://www.cnitblog.com/seeyeah/archive/2006/06/23/12746.html</guid><wfw:comment>http://www.cnitblog.com/seeyeah/comments/12746.html</wfw:comment><comments>http://www.cnitblog.com/seeyeah/archive/2006/06/23/12746.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/seeyeah/comments/commentRss/12746.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/seeyeah/services/trackbacks/12746.html</trackback:ping><description><![CDATA[
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<img src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align="top" />
				<span style="COLOR: #800000">&lt;DIV STYLE="width: 120px; height: 50px; border: 1px solid blue; <br /><img src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align="top" />            overflow: hidden; text-overflow:ellipsis"&gt; <br /><img src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align="top" />&lt;NOBR&gt;就是比如有一行文字，很长，表格内一行显示不下.&lt;/NOBR&gt; <br /><img src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align="top" />&lt;/DIV&gt; <br /><img src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align="top" /></span>
		</div>
<img src ="http://www.cnitblog.com/seeyeah/aggbug/12746.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/seeyeah/" target="_blank">KiMoGiGi</a> 2006-06-23 14:04 <a href="http://www.cnitblog.com/seeyeah/archive/2006/06/23/12746.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>