<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>http://jackxiang.com/post//</link>
<title><![CDATA[[转载]javascript固有编码方法比较 escape、encodeURI和encodeURIComponent]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[WEB2.0]]></category>
<pubDate>Wed, 24 Dec 2008 02:53:31 +0000</pubDate> 
<guid>http://jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	转载来源：http://www.160km.com/bear/?p=103<br/>javascript对文字进行编码涉及3个函数：escape,encodeURI,encodeURIComponent，相应3个解码函数：unescape,decodeURI,decodeURIComponent<br/><br/>1、&nbsp;&nbsp;传递参数时需要使用encodeURIComponent，这样组合的url才不会被#等特殊字符截断。天空<br/><br/>例如：&lt;script language=”javascript”&gt;document.write(’&lt;a href=”http://www.160km.com/?logout&amp;aid=7&amp; u=’+encodeURIComponent(”http://www.160km.com/bruce42″)+’”&gt;退出&lt;/a&amp; gt;’);&lt;/script&gt;<br/><br/>2、&nbsp;&nbsp;进行url跳转时可以整体使用encodeURI<br/><br/>例如：Location.href=encodeURI(”http://www.160km.com/do/s?word=小福&amp;ct=21″);<br/><br/>3、&nbsp;&nbsp;js使用数据时可以使用escape<br/><br/>例如：搜藏中history纪录。<br/><br/>4、&nbsp;&nbsp;escape对0-255以外的unicode值进行编码时输出%u****格式，其它情况下escape，encodeURI，encodeURIComponent编码结果相同。<br/><br/>最多使用的应为encodeURIComponent，它是将中文、韩文等特殊字符转换成utf-8格式的url编码，所以如果给后台传递参数需要使用encodeURIComponent时需要后台解码对utf-8支持（form中的编码方式和当前页面编码方式相同）<br/><br/>escape不编码字符有69个：*，+，-，.，/，@，_，0-9，a-z，A-Z<br/><br/>encodeURI不编码字符有82个：!，#，$，&amp;，’，(，)，*，+，,，-，.，/，:，;，=，?，@，_，~，0-9，a-z，A-Z<br/><br/>encodeURIComponent不编码字符有71个：!， ‘，(，)，*，-，.，_，~，0-9，a-z，A-Z
]]>
</description>
</item><item>
<link>http://jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] [转载]javascript固有编码方法比较 escape、encodeURI和encodeURIComponent]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>