<?xml version="1.0" encoding="gb2312"?>
<rss version="2.0">
<channel>
<title><![CDATA[notEnded]]></title>
        <image>
        <title>http://hi.baidu.com</title>
        <link>http://hi.baidu.com</link>
        <url>http://img.baidu.com/img/logo-hi.gif</url>
        </image>
<description><![CDATA[welcome to my blog]]></description>
<link>http://hi.baidu.com/wynote</link>
<language>zh-cn</language>
<generator>www.baidu.com</generator>
<ttl>5</ttl>


<item>
        <title><![CDATA[天气预报代码]]></title>
        <link><![CDATA[http://hi.baidu.com/wynote/blog/item/3ec080d8281a7d3f33fa1c9e.html]]></link>
        <description><![CDATA[
		
		<p>新浪天气预报代码(设置城市)：&lt;br&gt; <br>
&lt;IFRAME ID=&quot;ifm2&quot; WIDTH=&quot;260&quot; HEIGHT=&quot;70&quot; MARGINWIDTH=&quot;0&quot; MARGINHEIGHT=&quot;0&quot; HSPACE=&quot;0&quot; VSPACE=&quot;0&quot; FRAMEBORDER=&quot;0&quot; SCROLLING=&quot;NO&quot; src=&quot;<a href="http://news.sina.com.cn/iframe/weather/210301.html&quot;&gt;&lt;/iframe">http://news.sina.com.cn/iframe/weather/210301.html&quot;&gt;&lt;/iframe</a>&gt;<br>
&lt;br&gt;<br>
具体根据你想显示的城市调用分别的代码，以下是部分城市代码：<br>
&quot;110100&quot;,&quot;北京&quot; &quot;120100&quot;,&quot;天津&quot;<br>
&quot;130101&quot;,&quot;石家庄&quot; &quot;130201&quot;,&quot;唐山&quot;<br>
&quot;130301&quot;,&quot;秦皇岛&quot; &quot;130701&quot;,&quot;张家口&quot;<br>
&quot;130801&quot;,&quot;承德&quot; &quot;131001&quot;,&quot;廊坊&quot;<br>
&quot;130401&quot;,&quot;邯郸&quot; &quot;130501&quot;,&quot;邢台&quot;<br>
&quot;130601&quot;,&quot;保定&quot; &quot;130901&quot;,&quot;沧州&quot;<br>
&quot;133001&quot;,&quot;衡水&quot; &quot;140101&quot;,&quot;太原&quot;<br>
&quot;140201&quot;,&quot;大同&quot; &quot;140301&quot;,&quot;阳泉&quot;<br>
&quot;140501&quot;,&quot;晋城&quot; &quot;140601&quot;,&quot;朔州&quot;<br>
&quot;142201&quot;,&quot;忻州&quot; &quot;142331&quot;,&quot;离石&quot;<br>
&quot;142401&quot;,&quot;榆次&quot; &quot;142601&quot;,&quot;临汾&quot;<br>
&quot;142701&quot;,&quot;运城&quot; &quot;140401&quot;,&quot;长治&quot;<br>
&quot;150101&quot;,&quot;呼和浩特&quot; &quot;150201&quot;,&quot;包头&quot;<br>
&quot;150301&quot;,&quot;乌海&quot; &quot;152601&quot;,&quot;集宁&quot;<br>
&quot;152701&quot;,&quot;巴彦浩特&quot; &quot;152801&quot;,&quot;临河&quot;<br>
&quot;152921&quot;,&quot;鄂尔多斯&quot; &quot;150401&quot;,&quot;赤峰&quot;<br>
&quot;152301&quot;,&quot;通辽&quot; &quot;152502&quot;,&quot;锡林浩特&quot;<br>
&quot;152101&quot;,&quot;海拉尔&quot; &quot;152201&quot;,&quot;乌兰浩特&quot;<br>
&quot;210101&quot;,&quot;沈阳&quot; &quot;210201&quot;,&quot;大连&quot;<br>
&quot;210301&quot;,&quot;鞍山&quot; &quot;210401&quot;,&quot;抚顺&quot;<br>
&quot;210501&quot;,&quot;本溪&quot; &quot;210701&quot;,&quot;锦州&quot;<br>
&quot;210801&quot;,&quot;营口&quot; &quot;210901&quot;,&quot;阜新&quot;<br>
&quot;211101&quot;,&quot;盘锦&quot; &quot;211201&quot;,&quot;铁岭&quot;<br>
&quot;211301&quot;,&quot;朝阳&quot; &quot;211401&quot;,&quot;葫芦岛&quot;<br>
&quot;210601&quot;,&quot;丹东&quot; &quot;220101&quot;,&quot;长春&quot;<br>
&quot;220201&quot;,&quot;吉林&quot; &quot;220301&quot;,&quot;四平&quot;<br>
&quot;220401&quot;,&quot;辽源&quot; &quot;220601&quot;,&quot;松原&quot;<br>
&quot;222301&quot;,&quot;白城&quot; &quot;222401&quot;,&quot;延边&quot;<br>
&quot;220501&quot;,&quot;通化&quot; &quot;230101&quot;,&quot;哈尔滨&quot;<br>
&quot;230301&quot;,&quot;鸡西&quot; &quot;230401&quot;,&quot;鹤岗&quot;<br>
&quot;230501&quot;,&quot;双鸭山&quot; &quot;230701&quot;,&quot;伊春&quot;<br>
&quot;230801&quot;,&quot;佳木斯&quot; &quot;230901&quot;,&quot;七台河&quot;<br>
&quot;231001&quot;,&quot;牡丹江&quot; &quot;232301&quot;,&quot;绥化&quot;<br>
&quot;230201&quot;,&quot;齐齐哈尔&quot; &quot;230601&quot;,&quot;大庆&quot;<br>
&quot;232601&quot;,&quot;黑河&quot; &quot;232700&quot;,&quot;大兴安岭&quot;<br>
&quot;310100&quot;,&quot;上海&quot; &quot;320101&quot;,&quot;南京&quot;<br>
&quot;320201&quot;,&quot;无锡&quot; &quot;320301&quot;,&quot;徐州&quot;<br>
&quot;320401&quot;,&quot;常州&quot; &quot;320501&quot;,&quot;苏州&quot;<br>
&quot;320600&quot;,&quot;南通&quot; &quot;320701&quot;,&quot;连云港&quot;<br>
&quot;320801&quot;,&quot;淮阴&quot; &quot;320901&quot;,&quot;盐城&quot;<br>
&quot;321001&quot;,&quot;扬州&quot; &quot;321101&quot;,&quot;镇江&quot;<br>
&quot;321102&quot;,&quot;泰州&quot; &quot;321103&quot;,&quot;宿迁&quot;</p>
<p>&lt;br&gt;&lt;br&gt;<br>
265天气根据IP自动获得当地的天气情况：&lt;br&gt;<br>
&lt;iframe src=&quot;<a href="http://weather.265.com/weather.htm">http://weather.265.com/weather.htm</a>&quot; width=&quot;168&quot; height=&quot;54&quot; frameborder=&quot;no&quot; border=&quot;0&quot; marginwidth=&quot;0&amp;quoat; marginheight=&quot;0&quot; scrolling=&quot;no&quot;&gt;&lt;/iframe&gt;</p>
<p> </p> <a href="http://hi.baidu.com/wynote/blog/item/3ec080d8281a7d3f33fa1c9e.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/wynote/blog/category/html%2Bstyle">html+style</a>&nbsp;<a href="http://hi.baidu.com/wynote/blog/item/3ec080d8281a7d3f33fa1c9e.html#comment">查看评论</a>]]></description>
        <pubDate>2009年11月25日 星期三  09:32</pubDate>
        <category><![CDATA[html+style]]></category>
        <author><![CDATA[notEnded]]></author>
		<guid>http://hi.baidu.com/wynote/blog/item/3ec080d8281a7d3f33fa1c9e.html</guid>
</item>

<item>
        <title><![CDATA[用 INNER JOIN语法联接多个表建记录集]]></title>
        <link><![CDATA[http://hi.baidu.com/wynote/blog/item/2e25efc6de8d08119c163d5c.html]]></link>
        <description><![CDATA[
		
		<font size="2">多表联接建立记录集是十分有用的，因为某些情况下，我们需要把数字数据类型显示为相应的文本名称，这就遇到了多表联接建立记录集的问题。比如作一个会员注册系统，共有五个表，会员信息数据表member、会员身份表MemberIdentity、会员权限表MemberLevel、会员类别表MemberSort和会员婚姻状况表Wedlock。如果想把会员注册信息全部显示出来，肯定要将这四个表连起来，否则大家看到的某些会员信息可能只是数据编号。<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  以会员类别表来说，在其数据表中，1代表普通会员，2代表高级会员，3代表终身会员，在显示时，如果不将会员类别表与会员详细数据表相关联，那么假如我们现在看到的是一名普通会员的注册信息，我们只能看到其类别为1，而谁又会知道1代表的是普通会员呢？所以要将会员类别表与会员详细数据表相关联，关联后，1就显示为普通会员，2就显示为高级会员，3就显示为终身会员，这样多好？同理，其它两个表也要与会员详细数据表相关联才能把数据编号显示为相应的名称。<br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  前天制作网站后台时遇到此问题，在面包论坛、狂迷俱乐部、蓝色理想、和5D多媒体论坛发了贴子求救，都没有获得答案，只好自己研究，花了两天时间终于成功，现将其写成教程供大家分享，希望大家少走弯路。<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  本教程是把五个表联在一起，如果愿意，您可以将更多的表联在一起，方法大同小异啦~<br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  步骤一：用Access软件建立一个名为Member的数据库，在其中建五个表，分别为：会员信息数据表member、会员身份表MemberIdentity、会员权限表MemberLevel、会员类别表MemberSort和会员婚姻状况表Wedlock。<br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  ●会员信息数据表member：<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  MemberID：自动编号，主键（ID号）<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  MemberSort：数字（会员类别）<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  MemberName：文本，会员姓名<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  Password：文本（会员密码）<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  MemberLevel：数字（会员权限）<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  MemberIdentity：数字（会员身份）<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  Wedlock：数字（婚姻状况）<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  MemberQQ：文本（QQ号码）<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  MemberEmail：文本（会员邮箱）<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  MemberDate：日期/时间（会员注册日期）<br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  ●会员身份表MemberIdentity：<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  MemberIdentity：自动编号，主键（ID号）<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  IdentityName：文本（会员身份名称）<br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  ●会员权限表MemberLevel：<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  MemberLevel：自动编号，主键（ID号）<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  LevelName：文本（会员权限名称）<br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  ●会员类别表MemberSort：<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  MemberSort：自动编号，主键（ID号）<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  SortName：文本（会员类别名称）<br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  ●会员婚姻状况表Wedlock<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  Wedlock：自动编号，主键（ID号）<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  WedlockName：文本（会员婚姻状况类别）<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  说明：五个表建好后，您可以自行设置您想要的类别，如会员权限，您可以设置两个类别－－&ldquo;未付费会员&rdquo;和&ldquo;已付费会员&rdquo;，编号分别为&ldquo;1&rdquo;、&ldquo;2&rdquo;，如您设置了三个选项，那么第三个选项的编号当然就是&ldquo;3&rdquo;了。<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  下面我们所要作的工作就是把&ldquo;1&rdquo;、&ldquo;2&rdquo;之类的编号显示为&ldquo;未付费会员&rdquo;和&ldquo;已付费会员&rdquo;，否则，大家谁会知道&ldquo;1&rdquo;代表的是&ldquo;未付费会员&rdquo;，&ldquo;2&rdquo;代表的是&ldquo;已付费会员&rdquo;？<br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  步骤二：建DSN数据源，建记录集<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  ●运行Dreamweaver MX软件，在会员注册信息显示页面建一个名为ConnMember（您也可以起其它的名称）的DSN数据源。<br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  ●点击服务器行为面板中的&ldquo;绑定&rdquo;，建一个名为MemberShow的数据集，&ldquo;连接&rdquo;选择ConnMember，&ldquo;表格&rdquo;选择Member，&ldquo;列&rdquo;全选，&ldquo;排序&rdquo;选择MemberDate，降序。点击&ldquo;高级&rdquo;按钮，修改SQL框中自动生成的代码：<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  原代码为：<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  SELECT *<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  FROM Member<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  ORDER BY MemberDate DESC<br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  将代码修改为：<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  SELECT *<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  FROM (((Member INNER JOIN MemberSort ON Member.MemberSort=MemberSort.MemberSort) INNER JOIN MemberLevel ON Member.MemberLevel=MemberLevel.MemberLevel) INNER JOIN MemberIdentity ON Member.MemberIdentity=MemberIdentity.MemberIdentity) INNER JOIN Wedlock ON Member.Wedlock=Wedlock.Wedlock<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  ORDER BY MemberDate DESC<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  修改完代码后，点击&ldquo;确定&rdquo;，大功告成！<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  现在，您可以打开记录集看一下，五个表中的字段全部集成在MemberShow记录集中，您只要将相应的字段绑定在该字段想显示的单元格中即可。这下好了，所有的数字编号全部变成了相应的名称，如会员权限，不再是&ldquo;1&rdquo;和&ldquo;2&rdquo;的数字形式了，而是变成了相应的名称&ldquo;未付费会员&rdquo;和&ldquo;已付费会员&rdquo;。其它的数字编号也变成了显示的文本名称，是不是很开心呢？<br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  注意事项：<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  ●在输入字母过程中，一定要用英文半角标点符号，单词之间留一半角空格；<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  ●在建立数据表时，如果一个表与多个表联接，那么这一个表中的字段必须是&ldquo;数字&rdquo;数据类型，而多个表中的相同字段必须是主键，而且是&ldquo;自动编号&rdquo;数据类型。否则，很难联接成功。<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  ●代码嵌套快速方法：如，想连接五个表，则只要在连接四个表的代码上加一个前后括号（前括号加在FROM的后面，后括号加在代码的末尾即可），然后在后括号后面继续添加&ldquo;INNER JOIN 表名X ON 表1.字段号=表X.字段号&rdquo;代码即可，这样就可以无限联接数据表了：）<br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  语法格式：<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  其实 INNER JOIN ……ON的语法格式可以概括为：<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  FROM (((表1 INNER JOIN 表2 ON 表1.字段号=表2.字段号) INNER JOIN 表3 ON 表1.字段号=表3.字段号) INNER JOIN 表4 ON Member.字段号=表4.字段号) INNER JOIN 表X ON Member.字段号=表X.字段号<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  您只要套用该格式就可以了。<br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  现成格式范例：<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  虽然我说得已经比较明白了，但为照顾初学者，我还是以本会员注册系统为例，提供一些现成的语法格式范例，大家只要修改其中的数据表名称和字段名称即可。<br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  连接两个数据表的用法：<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  FROM Member INNER JOIN MemberSort ON Member.MemberSort=MemberSort.MemberSort<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  语法格式可以概括为：<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  FROM 表1 INNER JOIN 表2 ON 表1.字段号=表2.字段号<br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  连接三个数据表的用法：<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  FROM (Member INNER JOIN MemberSort ON Member.MemberSort=MemberSort.MemberSort) INNER JOIN MemberLevel ON Member.MemberLevel=MemberLevel.MemberLevel <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  语法格式可以概括为：<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  FROM (表1 INNER JOIN 表2 ON 表1.字段号=表2.字段号) INNER JOIN 表3 ON 表1.字段号=表3.字段号<br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  连接四个数据表的用法：<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  FROM ((Member INNER JOIN MemberSort ON Member.MemberSort=MemberSort.MemberSort) INNER JOIN MemberLevel ON Member.MemberLevel=MemberLevel.MemberLevel) INNER JOIN MemberIdentity ON Member.MemberIdentity=MemberIdentity.MemberIdentity<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  语法格式可以概括为：<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  FROM ((表1 INNER JOIN 表2 ON 表1.字段号=表2.字段号) INNER JOIN 表3 ON 表1.字段号=表3.字段号) INNER JOIN 表4 ON Member.字段号=表4.字段号<br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  连接五个数据表的用法：<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  FROM (((Member INNER JOIN MemberSort ON Member.MemberSort=MemberSort.MemberSort) INNER JOIN MemberLevel ON Member.MemberLevel=MemberLevel.MemberLevel) INNER JOIN MemberIdentity ON Member.MemberIdentity=MemberIdentity.MemberIdentity) INNER JOIN Wedlock ON Member.Wedlock=Wedlock.Wedlock<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  语法格式可以概括为：<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  FROM (((表1 INNER JOIN 表2 ON 表1.字段号=表2.字段号) INNER JOIN 表3 ON 表1.字段号=表3.字段号) INNER JOIN 表4 ON Member.字段号=表4.字段号) INNER JOIN 表5 ON Member.字段号=表5.字段号<br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  连接六个数据表的用法：略，与上述联接方法类似，大家举一反三吧：）</font> <a href="http://hi.baidu.com/wynote/blog/item/2e25efc6de8d08119c163d5c.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/wynote/blog/category/Sql">Sql</a>&nbsp;<a href="http://hi.baidu.com/wynote/blog/item/2e25efc6de8d08119c163d5c.html#comment">查看评论</a>]]></description>
        <pubDate>2009年11月23日 星期一  10:38</pubDate>
        <category><![CDATA[Sql]]></category>
        <author><![CDATA[notEnded]]></author>
		<guid>http://hi.baidu.com/wynote/blog/item/2e25efc6de8d08119c163d5c.html</guid>
</item>

<item>
        <title><![CDATA[联合表UnionData]]></title>
        <link><![CDATA[http://hi.baidu.com/wynote/blog/item/d3e8d64a07c6802908f7ef5c.html]]></link>
        <description><![CDATA[
		
		<p><font size="2">&lt;</font><a href="http://by117fd.bay117.hotmail.msn.com/cgi-bin/compose?mailto=1&amp;msg=CEAC026E-AE9A-4FC3-8E67-F207577F87F0&amp;start=0&amp;len=74411&amp;src=&amp;type=x&amp;to=%25@ &amp;cc=&amp;bcc=&amp;subject=&amp;body=&amp;curmbox=00000000-0000-0000-0000-000000000001&amp;a=9352f25949549c9c0eacd7c8b9bd4c9dc412d595b0d87198a4f15d78df265d17"><font size="2">%@LANGUAGE=&quot;VBSCRIPT</font></a><font size="2">&quot; CODEPAGE=&quot;936&quot;%&gt;<br>
&lt;%</font></p>
<p><font size="2">Option Explicit<br>
Dim Conn, Rs, Sql<br>
If Not Response.Buffer Then Response.Buffer = True</font></p>
<p><font size="2">Sub ConnStart()<br>
&nbsp;&nbsp;&nbsp;  Set Conn = Server.CreateObject(&quot;Adodb.Connection&quot;)<br>
&nbsp;&nbsp;&nbsp;  Conn.Open &quot;Provider=Microsoft.Jet.Oledb.4.0;Data Source=&quot;&amp;Server.MapPath(&quot;DataBase.mdb&quot;)<br>
&nbsp;&nbsp;&nbsp;  If Err Then<br>
Err.Clear<br>
Set Conn = Nothing<br>
Response.Write &quot;数据库链接失败，请管理员检查原因....&quot;<br>
Response.End<br>
&nbsp;&nbsp;&nbsp;  Else <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  Set Rs = Server.CreateObject(&quot;Adodb.RecordSet&quot;)<br>
&nbsp;&nbsp;&nbsp;  End If<br>
End Sub</font></p>
<p><font size="2">Sub ConnRelease()<br>
&nbsp;&nbsp;&nbsp;  Rs.Close<br>
&nbsp;&nbsp;&nbsp;  Set Rs = Nothing<br>
&nbsp;&nbsp;&nbsp;  Conn.Close<br>
&nbsp;&nbsp;&nbsp;  Set Conn = Nothing<br>
End Sub</font></p>
<p><font size="2">Call ConnStart()<br>
Sql = &quot;(Select * From B) union (Select * From A) Order By Times Desc&quot;<br>
Rs.Open Sql, Conn, 1, 3<br>
Do Until Rs.Eof<br>
&nbsp;&nbsp;&nbsp;  Response.Write(Rs(&quot;Title&quot;)&amp;&quot;&lt;br&gt;&quot;)<br>
&nbsp;&nbsp;&nbsp;  Rs.MoveNext<br>
Loop<br>
Call ConnRelease()<br>
%&gt;<br>
</font></p> <a href="http://hi.baidu.com/wynote/blog/item/d3e8d64a07c6802908f7ef5c.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/wynote/blog/category/Sql">Sql</a>&nbsp;<a href="http://hi.baidu.com/wynote/blog/item/d3e8d64a07c6802908f7ef5c.html#comment">查看评论</a>]]></description>
        <pubDate>2009年11月23日 星期一  10:38</pubDate>
        <category><![CDATA[Sql]]></category>
        <author><![CDATA[notEnded]]></author>
		<guid>http://hi.baidu.com/wynote/blog/item/d3e8d64a07c6802908f7ef5c.html</guid>
</item>

<item>
        <title><![CDATA[有关SQL模糊查询]]></title>
        <link><![CDATA[http://hi.baidu.com/wynote/blog/item/b03e82d56e0f1bce50da4b53.html]]></link>
        <description><![CDATA[
		
		<font size="2">在进行数据库查询时，有完整查询和模糊查询之分。<br>
<br>
一般模糊语句如下：<br>
<br>
</font>
<table cellspacing="1" width="100%" bgcolor="#cccccc" border="0">
    <tbody>
        <tr>
            <td bgcolor="#efefef"><font size="2">SELECT 字段 FROM 表 WHERE 某字段 Like 条件<br>
            </font></td>
        </tr>
    </tbody>
</table>
<br>
<br>
<font size="2">其中关于条件，SQL提供了四种匹配模式：<br>
<br>
<strong>1，%</strong>：表示任意0个或多个字符。可匹配任意类型和长度的字符，有些情况下若是中文，请使用两个百分号（%%）表示。<br>
<br>
比如 SELECT * FROM [user] WHERE u_name LIKE '%三%'<br>
<br>
将会把u_name为&ldquo;张三&rdquo;，&ldquo;张猫三&rdquo;、&ldquo;三脚猫&rdquo;，&ldquo;唐三藏&rdquo;等等有&ldquo;三&rdquo;的记录全找出来。<br>
<br>
另外，如果需要找出u_name中既有&ldquo;三&rdquo;又有&ldquo;猫&rdquo;的记录，请使用and条件<br>
SELECT * FROM [user] WHERE u_name LIKE '%三%' AND u_name LIKE '%猫%'<br>
<br>
若使用 SELECT * FROM [user] WHERE u_name LIKE '%三%猫%' <br>
虽然能搜索出&ldquo;三脚猫&rdquo;，但不能搜索出符合条件的&ldquo;张猫三&rdquo;。<br>
<br>
<strong>2，_</strong>： 表示任意单个字符。匹配单个任意字符，它常用来限制表达式的字符长度语句：<br>
<br>
比如 SELECT * FROM [user] WHERE u_name LIKE '_三_'<br>
只找出&ldquo;唐三藏&rdquo;这样u_name为三个字且中间一个字是&ldquo;三&rdquo;的；<br>
<br>
再比如 SELECT * FROM [user] WHERE u_name LIKE '三__';<br>
只找出&ldquo;三脚猫&rdquo;这样name为三个字且第一个字是&ldquo;三&rdquo;的；<br>
<br>
<br>
<strong>3，[ ]</strong>：表示括号内所列字符中的一个（类似正则表达式）。指定一个字符、字符串或范围，要求所匹配对象为它们中的任一个。<br>
<br>
比如 SELECT * FROM [user] WHERE u_name LIKE '[张李王]三'<br>
将找出&ldquo;张三&rdquo;、&ldquo;李三&rdquo;、&ldquo;王三&rdquo;（而不是&ldquo;张李王三&rdquo;）；<br>
<br>
如 [ ] 内有一系列字符（01234、abcde之类的）则可略写为&ldquo;0-4&rdquo;、&ldquo;a-e&rdquo;<br>
SELECT * FROM [user] WHERE u_name LIKE '老[1-9]'<br>
将找出&ldquo;老1&rdquo;、&ldquo;老2&rdquo;、……、&ldquo;老9&rdquo;；<br>
<br>
<strong>4，[^ ] </strong>：表示不在括号所列之内的单个字符。其取值和 [] 相同，但它要求所匹配对象为指定字符以外的任一个字符。<br>
<br>
比如 SELECT * FROM [user] WHERE u_name LIKE '[^张李王]三'<br>
将找出不姓&ldquo;张&rdquo;、&ldquo;李&rdquo;、&ldquo;王&rdquo;的&ldquo;赵三&rdquo;、&ldquo;孙三&rdquo;等；<br>
<br>
SELECT * FROM [user] WHERE u_name LIKE '老[^1-4]';<br>
将排除&ldquo;老1&rdquo;到&ldquo;老4&rdquo;，寻找&ldquo;老5&rdquo;、&ldquo;老6&rdquo;、……<br>
<br>
<strong>5，查询内容包含通配符时</strong><br>
<br>
由于通配符的缘故，导致我们查询特殊字符&ldquo;%&rdquo;、&ldquo;_&rdquo;、&ldquo;[&rdquo;的语句无法正常实现，而把特殊字符用&ldquo;[ ]&rdquo;括起便可正常查询。据此我们写出以下函数：<br>
<br>
</font>
<table cellspacing="1" width="100%" bgcolor="#cccccc" border="0">
    <tbody>
        <tr>
            <td bgcolor="#efefef"><br>
            <font size="2">Function SqlenCode(str)<br>
            &nbsp;&nbsp;&nbsp;&nbsp;  str = Replace(str,&quot;[&quot;,&quot;[[]&quot;) '此句一定要在最前<br>
            &nbsp;&nbsp;&nbsp;&nbsp;  str = Replace(str,&quot;_&quot;,&quot;[_]&quot;)<br>
            &nbsp;&nbsp;&nbsp;&nbsp;  str = Replace(str,&quot;%&quot;,&quot;[%]&quot;)<br>
            &nbsp;&nbsp;&nbsp;&nbsp;  SqlenCode = str<br>
            End Function<br>
            <br>
            </font></td>
        </tr>
    </tbody>
</table>
<br>
<font size="2">在查询前将待查字符串先经该函数处理即可。<br>
</font> <a href="http://hi.baidu.com/wynote/blog/item/b03e82d56e0f1bce50da4b53.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/wynote/blog/category/Sql">Sql</a>&nbsp;<a href="http://hi.baidu.com/wynote/blog/item/b03e82d56e0f1bce50da4b53.html#comment">查看评论</a>]]></description>
        <pubDate>2009年11月23日 星期一  10:37</pubDate>
        <category><![CDATA[Sql]]></category>
        <author><![CDATA[notEnded]]></author>
		<guid>http://hi.baidu.com/wynote/blog/item/b03e82d56e0f1bce50da4b53.html</guid>
</item>

<item>
        <title><![CDATA[Ext3.0带上传功能的编辑器及AjaxPost方式提交htmleditor内容写入数据库]]></title>
        <link><![CDATA[http://hi.baidu.com/wynote/blog/item/fd631b26207ada1d8b82a139.html]]></link>
        <description><![CDATA[
		
		<p><span><img class="blogimg" border="0" small="0" src="http://hiphotos.baidu.com/wynote/pic/item/e724a46dfe198fd4421694b9.jpg"><br>
<span><img class="blogimg" border="0" small="0" src="http://hiphotos.baidu.com/wynote/pic/item/6fc32ade8166ec77cdbf1aba.jpg"><br>
共5个文件及1张图片，图片为：<span><img class="blogimg" border="0" small="0" src="http://hiphotos.baidu.com/wynote/pic/item/02f428351610bfa4a71e1280.jpg"></span></span></span></p>
<p><span><span><span>首页：editor.html<br>
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>&quot;&gt;<br>
&lt;html xmlns=&quot;<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>&quot;&gt;<br>
&lt;head&gt;<br>
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;<br>
&lt;title&gt;editor&lt;/title&gt;<br>
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;../ext-3.0.0/resources/css/ext-all.css&quot; /&gt;<br>
&lt;script type=&quot;text/javascript&quot; src=&quot;../ext-3.0.0/adapter/ext/ext-base.js&quot;&gt;&lt;/script&gt;<br>
&lt;script type=&quot;text/javascript&quot; src=&quot;../ext-3.0.0/ext-all.js&quot;&gt;&lt;/script&gt;<br>
&lt;script type=&quot;text/javascript&quot; src=&quot;StarHtmleditor.js&quot;&gt;&lt;/script&gt;<br>
&lt;script type=&quot;text/javascript&quot;&gt;<br>
Ext.onReady(function(){<br>
Ext.QuickTips.init();<br>
Ext.form.Field.prototype.msgTarget = 'side';</span></span></span></p>
<p><span><span><span>form1 = new Ext.FormPanel({<br>
baseCls: 'x-plain',<br>
labelWidth : 55,<br>
items: [{<br>
&nbsp;&nbsp;  xtype : 'StarHtmleditor', //htmleditor <br>
&nbsp;&nbsp;  id : 'editor',&nbsp;&nbsp;  <br>
&nbsp;&nbsp;  name : 'editor',&nbsp;&nbsp;  <br>
&nbsp;&nbsp;  fieldLabel : '编辑器',&nbsp;&nbsp;  <br>
&nbsp;&nbsp;  width : 550, <br>
&nbsp;&nbsp;  height:200<br>
}],<br>
buttons: [{<br>
&nbsp;&nbsp;  text : '发布',<br>
&nbsp;&nbsp;  type: 'submit',<br>
&nbsp;&nbsp;  handler:function(){ <br>
&nbsp;&nbsp;  if(form1.form.isValid()){//验证合法后使用加载进度条<br>
&nbsp;&nbsp;&nbsp;  Ext.MessageBox.show({<br>
&nbsp;&nbsp;&nbsp;  title: '请稍等',<br>
&nbsp;&nbsp;&nbsp;  msg: '正在加载...',<br>
&nbsp;&nbsp;&nbsp;  progressText: '',<br>
&nbsp;&nbsp;&nbsp;  width:300,<br>
&nbsp;&nbsp;&nbsp;  progress:true,<br>
&nbsp;&nbsp;&nbsp;  closable:false,<br>
&nbsp;&nbsp;&nbsp;  animEl: 'loding'<br>
&nbsp;&nbsp;&nbsp;  });<br>
&nbsp;&nbsp;&nbsp;  //提交到服务器操作<br>
&nbsp;&nbsp;&nbsp;  form1.form.doAction('submit',{<br>
&nbsp;&nbsp;&nbsp;<a href="http://hi.baidu.com/fc/editor/ ajaxchk.aspx ,//">url:'ajaxchk.aspx',//</a>文件路径<br>
&nbsp;&nbsp;&nbsp;  method:'post',//提交方法post或get <br>
&nbsp;&nbsp;&nbsp;  params:'',&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;  //提交成功的回调函数<br>
&nbsp;&nbsp;&nbsp;  success:function(form,action)<br>
&nbsp;&nbsp;&nbsp;  {<br>
&nbsp;&nbsp;&nbsp;&nbsp;  if (action.result.msg=='ok') {<br>
&nbsp;&nbsp;&nbsp;&nbsp;  //document.location='index.html';<br>
&nbsp;&nbsp;&nbsp;&nbsp;  Ext.MessageBox.alert('登陆成功','ok');<br>
&nbsp;&nbsp;&nbsp;&nbsp;  } else {<br>
&nbsp;&nbsp;&nbsp;&nbsp;  Ext.Msg.alert('登陆错误',action.result.msg);<br>
&nbsp;&nbsp;&nbsp;&nbsp;  }<br>
&nbsp;&nbsp;&nbsp;  },<br>
&nbsp;&nbsp;&nbsp;  //提交失败的回调函数<br>
&nbsp;&nbsp;&nbsp;  failure:function(){<br>
&nbsp;&nbsp;&nbsp;&nbsp;  Ext.Msg.alert('错误','服务器出现错误请稍后再试！');<br>
&nbsp;&nbsp;&nbsp;  }<br>
&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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  <br>
&nbsp;&nbsp;  }<br>
&nbsp;&nbsp;  },{<br>
&nbsp;&nbsp;  text : '取消',<br>
&nbsp;&nbsp;  handler:function(){form1.form.reset();}<br>
}]<br>
});&nbsp;&nbsp;&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  <br>
win = new Ext.Window({<br>
id:'win',<br>
title:'editor',<br>
width:700,<br>
height:300,<br>
maximizable:true,//最大化<br>
closable:true,//关闭<br>
collapsible:true,//可折叠<br>
plain: true,<br>
items:form1//将表单作为窗体元素嵌套布局<br>
});<br>
win.show();//显示窗体</span></span></span></p>
<p><span><span><span>});<br>
&lt;/script&gt;<br>
&lt;/head&gt;</span></span></span></p>
<p><span><span><span>&lt;body&gt;</span></span></span></p>
<p><span><span><span>&lt;/body&gt;<br>
&lt;/html&gt;<br>
</span></span></span></p>
<span><span><span>
<p><br>
新编辑器注册：StarHtmleditor.js<br>
/**<br>
* 重载EXTJS-HTML编辑器<br>
* <br>
* @class HTMLEditor<br>
* @extends Ext.form.HtmlEditor<br>
* @author wuliangbo<br>
*/<br>
HTMLEditor = Ext.extend(Ext.form.HtmlEditor, {<br>
addImage : function() {<br>
&nbsp;&nbsp;  var editor = this;<br>
&nbsp;&nbsp;  var imgform = new Ext.FormPanel({<br>
&nbsp;&nbsp;&nbsp;  region : 'center',<br>
&nbsp;&nbsp;&nbsp;  labelWidth : 55,<br>
&nbsp;&nbsp;&nbsp;  frame : true,<br>
&nbsp;&nbsp;&nbsp;  bodyStyle : 'padding:5px 5px 0',<br>
&nbsp;&nbsp;&nbsp;  autoScroll : true,<br>
&nbsp;&nbsp;&nbsp;  border : false,<br>
&nbsp;&nbsp;&nbsp;  fileUpload : true,<br>
&nbsp;&nbsp;&nbsp;  items : [{<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  xtype : 'textfield',<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  fieldLabel : '选择文件',<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  name : 'userfile',<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  inputType : 'file',<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  allowBlank : false,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  blankText : '文件不能为空',<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  height : 25,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  anchor : '90%'<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  }],<br>
&nbsp;&nbsp;&nbsp;  buttons : [{<br>
&nbsp;&nbsp;&nbsp;&nbsp;  text : '上传',<br>
&nbsp;&nbsp;&nbsp;&nbsp;  type : 'submit',<br>
&nbsp;&nbsp;&nbsp;&nbsp;  handler : function() {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  if (!imgform.form.isValid()) {return;}<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  imgform.form.submit({<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  waitMsg : '正在上传......',<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  url : 'editorLoad.aspx',<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  success : function(form, action) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  var element = document.createElement(&quot;img&quot;);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  element.src = action.result.fileURL;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  if (Ext.isIE) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  editor.insertAtCursor(element.outerHTML);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  } else {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  var selection = editor.win.getSelection();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  if (!selection.isCollapsed) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  selection.deleteFromDocument();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  }<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  selection.getRangeAt(0).insertNode(element);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  }<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  win.hide();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  },<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  failure : function(form, action) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  form.reset();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  if (action.failureType == Ext.form.Action.SERVER_INVALID)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  Ext.MessageBox.alert('警告',<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  action.result.errors.msg);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  }<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  });<br>
&nbsp;&nbsp;&nbsp;&nbsp;  }<br>
&nbsp;&nbsp;&nbsp;  }, {<br>
&nbsp;&nbsp;&nbsp;&nbsp;  text : '关闭',<br>
&nbsp;&nbsp;&nbsp;&nbsp;  type : 'submit',<br>
&nbsp;&nbsp;&nbsp;&nbsp;  handler : function() {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  win.close(this);<br>
&nbsp;&nbsp;&nbsp;&nbsp;  }<br>
&nbsp;&nbsp;&nbsp;  }]<br>
&nbsp;&nbsp;  })</p>
<p>&nbsp;&nbsp;  var win = new Ext.Window({<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  title : &quot;上传图片&quot;,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  width : 300,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  height : 200,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  modal : true,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  border : false,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  iconCls : &quot;picture.png&quot;,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  layout : &quot;fit&quot;,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  items : imgform</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;  });<br>
&nbsp;&nbsp;  win.show();<br>
},<br>
createToolbar : function(editor) {<br>
&nbsp;&nbsp;  HTMLEditor.superclass.createToolbar.call(this, editor);<br>
&nbsp;&nbsp;  this.tb.insertButton(16, {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  cls : &quot;x-btn-icon&quot;,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  icon : &quot;picture.png&quot;,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  handler : this.addImage,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  scope : this<br>
&nbsp;&nbsp;&nbsp;&nbsp;  });<br>
}<br>
});<br>
Ext.reg('StarHtmleditor', HTMLEditor);</p>
<span><span><span>
<p><br>
图片上传接收处理页面：editorLoad.aspx<br>
&lt;%@ Page Language=&quot;C#&quot; ContentType=&quot;text/html&quot; ResponseEncoding=&quot;utf-8&quot; %&gt;<br>
&lt;script language=&quot;c#&quot; runat=&quot;server&quot;&gt;&nbsp;&nbsp;  <br>
public void Page_Load(object sender, System.EventArgs e)&nbsp;&nbsp;  <br>
{&nbsp;&nbsp;  <br>
/// 在此处放置用户代码以初始化页面&nbsp;&nbsp;  <br>
//if (this.IsPostBack) <br>
string fn = &quot;&quot;;<br>
&nbsp;&nbsp;&nbsp;  fn = this.SaveFiles();<br>
if(fn != &quot;&quot;)<br>
{<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  Response.Write(&quot;{success:true,fileURL:'&quot;+fn+&quot;'}&quot;);&nbsp;&nbsp;  <br>
}<br>
else<br>
{<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  Response.Write(&quot;{success:false,fileURL:'http://hiphotos.baidu.com/wynote/pic/item/6fc32adea63ff177cdbf1ad3.jpg'}&quot;);&nbsp;&nbsp;  <br>
}<br>
}&nbsp;&nbsp;</p>
<p>public string SaveFiles()&nbsp;&nbsp;  <br>
{&nbsp;&nbsp;  <br>
string nn=&quot;&quot;;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  ///'遍历File表单元素&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  HttpFileCollection files = HttpContext.Current.Request.Files;&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  try <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  {&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  for(int iFile = 0; iFile &lt; files.Count; iFile++)&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  {&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  ///'检查文件扩展名字&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  HttpPostedFile postedFile = files[iFile];&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  string fileName, fileExtension;&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  fileName = System.IO.Path.GetFileName(postedFile.FileName);&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  if (fileName != &quot;&quot;)&nbsp;&nbsp;  <br>
&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;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  postedFile.SaveAs(System.Web.HttpContext.Current.Request.MapPath(&quot;upload_files/&quot;) + fileName);&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;  nn = &quot;upload_files/&quot;+fileName;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  }&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  }&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  return nn;&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  }&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  catch(System.Exception Ex)&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  {&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  return nn;&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  }&nbsp;&nbsp;  <br>
}&nbsp;&nbsp;</p>
<p>&lt;/script&gt;</p>
<p><span><span><span><br>
编辑器内容ajax接收处理页面：ajaxchk.aspx<br>
&lt;%@ Page Language=&quot;C#&quot; AutoEventWireup=&quot;true&quot; CodeFile=&quot;ajaxchk.aspx.cs&quot; Inherits=&quot;admin_ajaxchk&quot; %&gt;<br>
<br>
.cs页面</span></span></span></p>
<p><span><span><span>using System;<br>
using System.Collections;<br>
using System.Configuration;<br>
using System.Data;<br>
using System.Linq;<br>
using System.Web;<br>
using System.Web.Security;<br>
using System.Web.UI;<br>
using System.Web.UI.HtmlControls;<br>
using System.Web.UI.WebControls;<br>
using System.Web.UI.WebControls.WebParts;<br>
using System.Xml.Linq;<br>
using System.Data.OleDb;</span></span></span></p>
<p><span><span><span>public partial class admin_ajaxchk : System.Web.UI.Page<br>
{<br>
&nbsp;&nbsp;&nbsp;  protected void Page_Load(object sender, EventArgs e)<br>
&nbsp;&nbsp;&nbsp;  {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  Response.ContentType = &quot;text/html; charset=utf-8&quot;;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  string user = Request.Form[&quot;editor&quot;].Replace(&quot;'&quot;, &quot;&lsquo;&quot;);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  OleDbConnection Conn = new OleDbConnection();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  Conn = new OleDbConnection(&quot;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|data.mdb;&quot;);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  Conn.Open();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  OleDbCommand cmd;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  cmd = new OleDbCommand(&quot;insert into [db] ([content]) values ('&quot;+user+&quot;')&quot;, Conn);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  cmd.ExecuteScalar();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  Conn.Close();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  Response.Write(&quot;{success:true,msg:'ok'}&quot;);&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;  }<br>
}<br>
<span><img class="blogimg" border="0" small="0" src="http://hiphotos.baidu.com/wynote/pic/item/29e14d0762ffd8e27b89479b.jpg"><br>
</span><br>
<br>
</span></span></span></p>
</span></span></span></span></span></span> <a href="http://hi.baidu.com/wynote/blog/item/fd631b26207ada1d8b82a139.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/wynote/blog/category/Ext">Ext</a>&nbsp;<a href="http://hi.baidu.com/wynote/blog/item/fd631b26207ada1d8b82a139.html#comment">查看评论</a>]]></description>
        <pubDate>2009年11月22日 星期日  17:05</pubDate>
        <category><![CDATA[Ext]]></category>
        <author><![CDATA[notEnded]]></author>
		<guid>http://hi.baidu.com/wynote/blog/item/fd631b26207ada1d8b82a139.html</guid>
</item>

<item>
        <title><![CDATA[ext表单控件]]></title>
        <link><![CDATA[http://hi.baidu.com/wynote/blog/item/9e6edf23258353589922ed2e.html]]></link>
        <description><![CDATA[
		
		<p>Ext.onReady(function() {&nbsp;&nbsp;  <br>
// 对于提交中出现的乱码，在Ext中可以修改Request Header中Content-Type的设置&nbsp;&nbsp;  <br>
Ext.lib.Ajax.defaultPostHeader += &quot;;charset=utf-8&quot;;&nbsp;&nbsp;  <br>
Ext.QuickTips.init();&nbsp;&nbsp;  <br>
Ext.apply(Ext.QuickTips.getQuickTip(), {&nbsp;&nbsp;  <br>
dismissDelay : 0&nbsp;&nbsp;  <br>
});&nbsp;&nbsp;  <br>
Ext.form.Field.prototype.msgTarget = 'side';&nbsp;&nbsp;</p>
<p>var data = [['湖北', 'hubei'], ['江西', 'jiangxi'], ['江苏', 'jiangsu'],&nbsp;&nbsp;  <br>
['安徽', 'anhui'], ['北京', 'beijing'], ['上海', 'shanghai'],&nbsp;&nbsp;  <br>
['天津', 'tianjin']];&nbsp;&nbsp;  <br>
var store = new Ext.data.SimpleStore({&nbsp;&nbsp;  <br>
fields : ['chinese', 'english'],&nbsp;&nbsp;  <br>
data : data&nbsp;&nbsp;  <br>
});&nbsp;&nbsp;</p>
<p>var combo1 = new Ext.form.ComboBox({&nbsp;&nbsp;  <br>
id : 'province',&nbsp;&nbsp;  <br>
name : 'province',&nbsp;&nbsp;  <br>
hiddenName : 'provinceHidden',&nbsp;&nbsp;  <br>
displayField : 'chinese',&nbsp;&nbsp;  <br>
valueField : 'english',&nbsp;&nbsp;  <br>
mode : 'local',&nbsp;&nbsp;  <br>
minChars : '1',&nbsp;&nbsp;  <br>
queryDelay : 300,// 延时300毫秒&nbsp;&nbsp;  <br>
store : store,&nbsp;&nbsp;  <br>
triggerAction : &quot;all&quot;,&nbsp;&nbsp;  <br>
pageSize : 3,&nbsp;&nbsp;  <br>
width : 200,&nbsp;&nbsp;  <br>
labelSeparator : ':',&nbsp;&nbsp;  <br>
emptyText : '请选择',&nbsp;&nbsp;  <br>
fieldLabel : '省',&nbsp;&nbsp;  <br>
readOnly : false,&nbsp;&nbsp;  <br>
listeners : {&nbsp;&nbsp;  <br>
select : function(comb, record, index) {&nbsp;&nbsp;  <br>
alert(comb.getValue());&nbsp;&nbsp;  <br>
}&nbsp;&nbsp;  <br>
}&nbsp;&nbsp;  <br>
});&nbsp;&nbsp;  <br>
// 创建Form面板&nbsp;&nbsp;  <br>
var form = new Ext.form.FormPanel({&nbsp;&nbsp;  <br>
id : 'form',&nbsp;&nbsp;  <br>
name : 'form',&nbsp;&nbsp;  <br>
// applyTo : 'div1',&nbsp;&nbsp;  <br>
frame : true,&nbsp;&nbsp;  <br>
bodyStyle : 'padding:1px 0 0 0;',&nbsp;&nbsp;  <br>
buttonAlign : 'center',&nbsp;&nbsp;  <br>
labelAlign : 'left',&nbsp;&nbsp;  <br>
labelWidth : 60,&nbsp;&nbsp;  <br>
width : 600,&nbsp;&nbsp;  <br>
defaultType : 'textfield',&nbsp;&nbsp;  <br>
items : [{&nbsp;&nbsp;  <br>
id : 'username',&nbsp;&nbsp;  <br>
name : 'username',&nbsp;&nbsp;  <br>
allowBlank : false,&nbsp;&nbsp;  <br>
msgTarget : 'qtip',&nbsp;&nbsp;  <br>
fieldLabel : '姓名',&nbsp;&nbsp;  <br>
itemCls : 'sex-male', // 向左边浮动,处理控件横排&nbsp;&nbsp;  <br>
clearCls : 'allow-float'// 允许两边浮动&nbsp;&nbsp;  <br>
}, {&nbsp;&nbsp;  <br>
id : 'password',&nbsp;&nbsp;  <br>
name : 'password',&nbsp;&nbsp;  <br>
fieldLabel : '密码',&nbsp;&nbsp;  <br>
inputType : 'password'  <br>
}, {&nbsp;&nbsp;  <br>
xtype : 'radio',&nbsp;&nbsp;  <br>
fieldLabel : '性别',&nbsp;&nbsp;  <br>
boxLabel : '男',&nbsp;&nbsp;  <br>
name : 'sex',&nbsp;&nbsp;  <br>
id : 'male',&nbsp;&nbsp;  <br>
itemCls : 'sex-male', // 向左边浮动,处理控件横排&nbsp;&nbsp;  <br>
clearCls : 'allow-float', // 允许两边浮动,在实际生成的HTML结构中有专门的DIV阻断浮动&nbsp;&nbsp;  <br>
checked : true  <br>
}, {&nbsp;&nbsp;  <br>
xtype : 'radio',&nbsp;&nbsp;  <br>
boxLabel : '女',&nbsp;&nbsp;  <br>
name : 'sex',&nbsp;&nbsp;  <br>
id : 'female',&nbsp;&nbsp;  <br>
width : 60,&nbsp;&nbsp;  <br>
itemCls : 'sex-female', // 向左浮动,处理控件横排&nbsp;&nbsp;  <br>
clearCls : 'allow-float', // 允许两边浮动&nbsp;&nbsp;  <br>
hideLabel : true  <br>
// 不显示前面&quot;性别&quot;的标签&nbsp;&nbsp;  <br>
}, {&nbsp;&nbsp;  <br>
xtype : 'checkbox',&nbsp;&nbsp;  <br>
boxLabel : '是否毕业',&nbsp;&nbsp;  <br>
name : 'graduate',&nbsp;&nbsp;  <br>
id : 'graduate',&nbsp;&nbsp;  <br>
itemCls : 'sex-female', // 向左浮动,处理控件横排&nbsp;&nbsp;  <br>
clearCls : 'allow-float', // 允许两边浮动&nbsp;&nbsp;  <br>
hideLabel : true  <br>
// 不显示前面&quot;性别&quot;的标签&nbsp;&nbsp;  <br>
}, {&nbsp;&nbsp;  <br>
xtype : 'numberfield',&nbsp;&nbsp;  <br>
fieldLabel : '年龄',&nbsp;&nbsp;  <br>
id : 'i_age',&nbsp;&nbsp;  <br>
name : 'n_age',&nbsp;&nbsp;  <br>
allowNegative : false,&nbsp;&nbsp;  <br>
allowDecimals : false,&nbsp;&nbsp;  <br>
itemCls : 'age-field', // 向左浮动,处理控件横排&nbsp;&nbsp;  <br>
clearCls : 'allow-float', // 允许两边浮动&nbsp;&nbsp;  <br>
width : 90&nbsp;&nbsp;  <br>
}, {&nbsp;&nbsp;  <br>
xtype : 'textfield',&nbsp;&nbsp;  <br>
fieldLabel : '住址',&nbsp;&nbsp;  <br>
name : 'n_address',&nbsp;&nbsp;  <br>
allowBlank : false,&nbsp;&nbsp;  <br>
emptyText : '请输入',&nbsp;&nbsp;  <br>
id : 'i_address',&nbsp;&nbsp;  <br>
maxLength : 20,&nbsp;&nbsp;  <br>
itemCls : 'stop-float', // 不允许浮动,结束控件横排&nbsp;&nbsp;  <br>
width : 300&nbsp;&nbsp;  <br>
}, {&nbsp;&nbsp;  <br>
xtype : 'datefield',&nbsp;&nbsp;  <br>
fieldLabel : '出生日期',&nbsp;&nbsp;  <br>
name : 'n_birthday',&nbsp;&nbsp;  <br>
id : 'i_birthday',&nbsp;&nbsp;  <br>
disabledDays : [0],// 禁止选择星期日&nbsp;&nbsp;  <br>
itemCls : 'sex-male', // 不允许浮动,结束控件横排&nbsp;&nbsp;  <br>
clearCls : 'allow-float', // 允许两边浮动&nbsp;&nbsp;  <br>
width : 120&nbsp;&nbsp;  <br>
}, {&nbsp;&nbsp;  <br>
xtype : 'timefield',&nbsp;&nbsp;  <br>
fieldLabel : ' ',&nbsp;&nbsp;  <br>
name : 'n_time',&nbsp;&nbsp;  <br>
id : 'i_time',&nbsp;&nbsp;  <br>
itemCls : 'sex-male', // 不允许浮动,结束控件横排&nbsp;&nbsp;  <br>
clearCls : 'allow-float', // 允许两边浮动&nbsp;&nbsp;  <br>
width : 120,&nbsp;&nbsp;  <br>
hideLabel : true  <br>
}, {&nbsp;&nbsp;  <br>
xtype : &quot;trigger&quot;,&nbsp;&nbsp;  <br>
fieldLabel : &quot;触发&quot;,&nbsp;&nbsp;  <br>
anchor : &quot;50%&quot;,&nbsp;&nbsp;  <br>
onTriggerClick : function(e) {// 在这里写你要实现的事件，很容易扩展&nbsp;&nbsp;  <br>
alert(&quot;<a href="http://www.langsin.com/">www.langsin.com</a>&quot;);&nbsp;&nbsp;  <br>
}&nbsp;&nbsp;  <br>
}, {&nbsp;&nbsp;  <br>
xtype : 'textarea',&nbsp;&nbsp;  <br>
fieldLabel : '备注',&nbsp;&nbsp;  <br>
name : 'n_area',&nbsp;&nbsp;  <br>
id : 'i_area',&nbsp;&nbsp;  <br>
// itemCls:'sex-male', //不允许浮动,结束控件横排&nbsp;&nbsp;  <br>
// clearCls:'allow-float', //允许两边浮动&nbsp;&nbsp;  <br>
width : 300&nbsp;&nbsp;  <br>
}, {&nbsp;&nbsp;  <br>
xtype : 'checkboxgroup',&nbsp;&nbsp;  <br>
fieldLabel : '外协录入',&nbsp;&nbsp;  <br>
columns : 4,&nbsp;&nbsp;  <br>
items : [{&nbsp;&nbsp;  <br>
boxLabel : '外协申请批件',&nbsp;&nbsp;  <br>
name : 'lrb1',&nbsp;&nbsp;  <br>
inputValue : '100'  <br>
}, {&nbsp;&nbsp;  <br>
boxLabel : '合同洽谈',&nbsp;&nbsp;  <br>
name : 'lrb2',&nbsp;&nbsp;  <br>
inputValue : '101'  <br>
}, {&nbsp;&nbsp;  <br>
boxLabel : '市场准入材料',&nbsp;&nbsp;  <br>
name : 'lrb3',&nbsp;&nbsp;  <br>
inputValue : '102'  <br>
}, {&nbsp;&nbsp;  <br>
boxLabel : '网上审批',&nbsp;&nbsp;  <br>
name : 'lrb4',&nbsp;&nbsp;  <br>
inputValue : '103'  <br>
}, {&nbsp;&nbsp;  <br>
boxLabel : '合同信息',&nbsp;&nbsp;  <br>
name : 'lrb5',&nbsp;&nbsp;  <br>
inputValue : '104'  <br>
}, {&nbsp;&nbsp;  <br>
boxLabel : '付款情况',&nbsp;&nbsp;  <br>
name : 'lrb6',&nbsp;&nbsp;  <br>
inputValue : '105'  <br>
}, {&nbsp;&nbsp;  <br>
boxLabel : '检查验收',&nbsp;&nbsp;  <br>
name : 'lrb7',&nbsp;&nbsp;  <br>
inputValue : '106'  <br>
}]&nbsp;&nbsp;  <br>
}, {&nbsp;&nbsp;  <br>
xtype : 'combo',&nbsp;&nbsp;  <br>
fieldLabel : '网站',&nbsp;&nbsp;  <br>
name : 'n_url',&nbsp;&nbsp;  <br>
triggerAction : &quot;all&quot;,// 请设置为&quot;all&quot;,否则默认为&quot;query&quot;的情况下，你选择某个值后，再此下拉时，只出现匹配选项，如果设为&quot;all&quot;的话，每次下拉均显示全部选项&nbsp;&nbsp;  <br>
listeners : {&nbsp;&nbsp;  <br>
select : function(comb, record, index) {&nbsp;&nbsp;  <br>
alert(comb.getValue());&nbsp;&nbsp;  <br>
}&nbsp;&nbsp;  <br>
},&nbsp;&nbsp;  <br>
readOnly : true,&nbsp;&nbsp;  <br>
transform : &quot;select&quot;,// html中的id&nbsp;&nbsp;  <br>
lazyRender : true,&nbsp;&nbsp;  <br>
width : 120&nbsp;&nbsp;  <br>
}, {// 显示图片&nbsp;&nbsp;  <br>
id : 'browseImage',&nbsp;&nbsp;  <br>
fieldLabel : '照片',&nbsp;&nbsp;  <br>
autoCreate : {&nbsp;&nbsp;  <br>
tag : 'input',&nbsp;&nbsp;  <br>
type : 'image',&nbsp;&nbsp;  <br>
src : 'demo/oicq.gif',&nbsp;&nbsp;  <br>
// src : Ext.BLANK_IMAGE_URL,&nbsp;&nbsp;  <br>
style : 'filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale);',&nbsp;&nbsp;  <br>
name : 'imageBrowse'  <br>
}&nbsp;&nbsp;  <br>
}, {&nbsp;&nbsp;  <br>
inputType : 'file',&nbsp;&nbsp;  <br>
id : 'imageUpload',&nbsp;&nbsp;  <br>
fieldLabel : '文件',&nbsp;&nbsp;  <br>
width : 300&nbsp;&nbsp;  <br>
}, {&nbsp;&nbsp;  <br>
id : 'url',&nbsp;&nbsp;  <br>
name : 'url',&nbsp;&nbsp;  <br>
allowBlank : false,&nbsp;&nbsp;  <br>
width : 300,&nbsp;&nbsp;  <br>
fieldLabel : '网址',&nbsp;&nbsp;  <br>
value : 'http://www.163.com',&nbsp;&nbsp;  <br>
vtype : 'url'// url,email,alpha,alphanum&nbsp;&nbsp;  <br>
}, combo1, {&nbsp;&nbsp;  <br>
xtype : 'htmleditor',&nbsp;&nbsp;  <br>
id : 'editor',&nbsp;&nbsp;  <br>
name : 'editor',&nbsp;&nbsp;  <br>
fieldLabel : '编辑器',&nbsp;&nbsp;  <br>
// fontFamilies:['宋体','隶书','楷体'],&nbsp;&nbsp;  <br>
width : 250,&nbsp;&nbsp;  <br>
anchor : &quot;99%&quot;  <br>
}&nbsp;&nbsp;</p>
<p>],&nbsp;&nbsp;  <br>
buttons : [{&nbsp;&nbsp;  <br>
text : '确定',&nbsp;&nbsp;  <br>
handler : onOK&nbsp;&nbsp;  <br>
// 实际应用一般是处理form.getForm.submit()事件&nbsp;&nbsp;  <br>
}, {&nbsp;&nbsp;  <br>
text : '重置',&nbsp;&nbsp;  <br>
handler : function() {&nbsp;&nbsp;</p>
<p>form.form.getEl().dom.reset();// 使用Dom的刷新方法&nbsp;&nbsp;  <br>
form.getForm().reset();// Ext reset()&nbsp;&nbsp;  <br>
// 方法刷新时,无法刷新inputType:file的值的解决方法&nbsp;&nbsp;  <br>
}&nbsp;&nbsp;  <br>
}],&nbsp;&nbsp;  <br>
keys : [{ // 处理键盘回车事件&nbsp;&nbsp;  <br>
key : Ext.EventObject.ENTER,&nbsp;&nbsp;  <br>
fn : onOK,&nbsp;&nbsp;  <br>
scope : this  <br>
}]&nbsp;&nbsp;  <br>
});&nbsp;&nbsp;</p>
<p>var menus = new Ext.menu.Menu({&nbsp;&nbsp;  <br>
shadow : 'frame',// 设置菜单四打边有阴影&nbsp;&nbsp;  <br>
items : [{&nbsp;&nbsp;  <br>
text : '是否启用',&nbsp;&nbsp;  <br>
checked : true,&nbsp;&nbsp;  <br>
handler : onSave&nbsp;&nbsp;  <br>
}, {&nbsp;&nbsp;  <br>
text : '另存为',&nbsp;&nbsp;  <br>
handler : onSave,&nbsp;&nbsp;  <br>
menu : new Ext.menu.Menu({&nbsp;&nbsp;  <br>
items : [{&nbsp;&nbsp;  <br>
text : '文件另存为',&nbsp;&nbsp;  <br>
group : 'theme',&nbsp;&nbsp;  <br>
checked : false,&nbsp;&nbsp;  <br>
handler : onSave&nbsp;&nbsp;  <br>
}, {&nbsp;&nbsp;  <br>
text : '图片另存为',&nbsp;&nbsp;  <br>
group : 'theme',&nbsp;&nbsp;  <br>
checked : false,&nbsp;&nbsp;  <br>
handler : onSave&nbsp;&nbsp;  <br>
}]&nbsp;&nbsp;  <br>
})&nbsp;&nbsp;  <br>
}]&nbsp;&nbsp;  <br>
});&nbsp;&nbsp;  <br>
function onSave(item) {&nbsp;&nbsp;  <br>
alert(item.text);&nbsp;&nbsp;  <br>
}&nbsp;&nbsp;</p>
<p>// 工具栏&nbsp;&nbsp;  <br>
var toolbar = new Ext.Toolbar({&nbsp;&nbsp;  <br>
applyTo : 'tool',&nbsp;&nbsp;  <br>
width : 500&nbsp;&nbsp;  <br>
});&nbsp;&nbsp;  <br>
toolbar.addButton([{&nbsp;&nbsp;  <br>
text : '新建'  <br>
}, {&nbsp;&nbsp;  <br>
text : '打开'  <br>
}, {&nbsp;&nbsp;  <br>
text : '保存'  <br>
}]);&nbsp;&nbsp;  <br>
toolbar.addSeparator();&nbsp;&nbsp;  <br>
toolbar.addField(new Ext.form.TextField({&nbsp;&nbsp;  <br>
width : 30&nbsp;&nbsp;  <br>
}));&nbsp;&nbsp;  <br>
toolbar.addFill();&nbsp;&nbsp;  <br>
toolbar.addText('静态文本');&nbsp;&nbsp;  <br>
toolbar.add('-', '-&gt;', {&nbsp;&nbsp;  <br>
text : '文件',&nbsp;&nbsp;  <br>
menu : menus&nbsp;&nbsp;  <br>
});&nbsp;&nbsp;</p>
<p>// 确定按钮事件,这里只是简单获取各控件值,实际应用一般和后台脚本结合&nbsp;&nbsp;  <br>
function onOK() {&nbsp;&nbsp;  <br>
var strMsg;&nbsp;&nbsp;  <br>
strMsg = '姓名：' + form.getComponent('username').getValue() + '，性别：';&nbsp;&nbsp;  <br>
if (form.getComponent('male').checked)&nbsp;&nbsp;  <br>
strMsg += '男';&nbsp;&nbsp;  <br>
if (form.getComponent('female').checked)&nbsp;&nbsp;  <br>
strMsg += '女';&nbsp;&nbsp;  <br>
strMsg += '，年龄：' + form.getComponent('i_age').getValue();&nbsp;&nbsp;  <br>
strMsg += '，住址：' + form.getComponent('i_address').getValue();&nbsp;&nbsp;</p>
<p>// 通过循环遍历checkboxgroup获得值&nbsp;&nbsp;  <br>
// alert(strMsg);&nbsp;&nbsp;  <br>
var checkboxgroup = form.items.itemAt(11);&nbsp;&nbsp;  <br>
// alert(checkboxgroup.getXType());//类型&nbsp;&nbsp;</p>
<p>var vItems = checkboxgroup.items;&nbsp;&nbsp;  <br>
var vCount = vItems.getCount();&nbsp;&nbsp;  <br>
for (var i = 0; i &lt; vCount; i++) {&nbsp;&nbsp;  <br>
// alert(vItems.itemAt(i).getValue());//值&nbsp;&nbsp;  <br>
}&nbsp;&nbsp;</p>
<p>form.form.submit({&nbsp;&nbsp;  <br>
waitMsg : '登陆中,请稍等...',&nbsp;&nbsp;  <br>
method : 'POST',&nbsp;&nbsp;  <br>
clientValidation : true,&nbsp;&nbsp;  <br>
params : {&nbsp;&nbsp;  <br>
p : '参数'  <br>
}, // 传递的参数&nbsp;&nbsp;  <br>
url : &quot;demo/MyJsp.jsp&quot;,&nbsp;&nbsp;  <br>
// 定义要跳转的url,格式被请求的页面格式为{ 'success': true,'msg': '成功'}&nbsp;&nbsp;  <br>
success : function(form, action) {&nbsp;&nbsp;  <br>
// Ext.Msg.alert('信息',&quot;提示：&quot;+&quot;response.responseText&quot;);//加粗体是得到后台的具体返回信息。&nbsp;&nbsp;  <br>
Ext.Msg.alert('提示', &quot;数据修改成功&quot;);// 成功提示信息&nbsp;&nbsp;  <br>
},&nbsp;&nbsp;  <br>
failure : function(form, action) {&nbsp;&nbsp;  <br>
Ext.Msg.alert('提示', action.failureType);&nbsp;&nbsp;  <br>
}&nbsp;&nbsp;  <br>
});&nbsp;&nbsp;  <br>
}&nbsp;&nbsp;</p>
<p>// 创建主窗口&nbsp;&nbsp;  <br>
var win = new Ext.Window({&nbsp;&nbsp;  <br>
title : 'Ext中的FormPanel面板及Form控件',&nbsp;&nbsp;  <br>
width : window.document.body.clientWidth / 2,&nbsp;&nbsp;  <br>
closable : true,&nbsp;&nbsp;  <br>
y : 10,&nbsp;&nbsp;  <br>
collapsible : true,&nbsp;&nbsp;  <br>
// draggable: false,&nbsp;&nbsp;  <br>
resizable : false,&nbsp;&nbsp;  <br>
modal : false,&nbsp;&nbsp;  <br>
closeAction : 'hide',&nbsp;&nbsp;  <br>
tbar : [{&nbsp;&nbsp;  <br>
text : '顶部按钮'  <br>
}],&nbsp;&nbsp;  <br>
border : true,&nbsp;&nbsp;  <br>
manager : wgroup,&nbsp;&nbsp;  <br>
items : [form],&nbsp;&nbsp;  <br>
buttons : []&nbsp;&nbsp;  <br>
});&nbsp;&nbsp;  <br>
win.show();&nbsp;&nbsp;</p>
<p>var wgroup = Ext.WindowGroup();&nbsp;&nbsp;  <br>
// 隐藏全部window&nbsp;&nbsp;  <br>
// wgroup.hideAll();&nbsp;&nbsp;</p>
<p>});&nbsp;&nbsp;</p>
<p>/**  <br>
* 在Ext2.2的Ext.form.FormPanel中如果有RadioGroup或者CheckboxGroup，那么  <br>
* FormPanel.form.setValues方法对这2个东东内部的radio和checkbox无法动态赋值，需要对  <br>
* Ext.form.BasicForm的findField方法进行修正，代码如下：  <br>
*/  <br>
Ext.override(Ext.form.BasicForm, {&nbsp;&nbsp;  <br>
findField : function(id) {&nbsp;&nbsp;  <br>
var field = this.items.get(id);&nbsp;&nbsp;  <br>
if (!field) {&nbsp;&nbsp;  <br>
this.items.each(function(f) {&nbsp;&nbsp;  <br>
if (f.isXType('radiogroup') || f.isXType('checkboxgroup')) {&nbsp;&nbsp;  <br>
f.items.each(function(c) {&nbsp;&nbsp;  <br>
if (c.isFormField&nbsp;&nbsp;  <br>
&amp;&amp; (c.dataIndex == id || c.id == id || c&nbsp;&nbsp;  <br>
.getName() == id)) {&nbsp;&nbsp;  <br>
field = c;&nbsp;&nbsp;  <br>
return false;&nbsp;&nbsp;  <br>
}&nbsp;&nbsp;  <br>
});&nbsp;&nbsp;  <br>
}&nbsp;&nbsp;</p>
<p>if (f.isFormField&nbsp;&nbsp;  <br>
&amp;&amp; (f.dataIndex == id || f.id == id || f.getName() == id)) {&nbsp;&nbsp;  <br>
field = f;&nbsp;&nbsp;  <br>
return false;&nbsp;&nbsp;  <br>
}&nbsp;&nbsp;  <br>
});&nbsp;&nbsp;  <br>
}&nbsp;&nbsp;  <br>
return field || null;&nbsp;&nbsp;  <br>
}&nbsp;&nbsp;  <br>
}); </p>
<p><br>
本文来自CSDN博客，转载请标明出处：<a href="http://blog.csdn.net/renjunfu_8792321/archive/2009/07/19/4362344.as">http://blog.csdn.net/renjunfu_8792321/archive/2009/07/19/4362344.as</a></p> <a href="http://hi.baidu.com/wynote/blog/item/9e6edf23258353589922ed2e.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/wynote/blog/category/Ext">Ext</a>&nbsp;<a href="http://hi.baidu.com/wynote/blog/item/9e6edf23258353589922ed2e.html#comment">查看评论</a>]]></description>
        <pubDate>2009年11月22日 星期日  11:19</pubDate>
        <category><![CDATA[Ext]]></category>
        <author><![CDATA[notEnded]]></author>
		<guid>http://hi.baidu.com/wynote/blog/item/9e6edf23258353589922ed2e.html</guid>
</item>

<item>
        <title><![CDATA[Ext3表单Post方法Ajax实例C#版DotNet开发]]></title>
        <link><![CDATA[http://hi.baidu.com/wynote/blog/item/ccc495f3e68fb8c10b46e07f.html]]></link>
        <description><![CDATA[
		
		<p><strong><font color="#ff0000">ajax.html<br>
</font></strong>&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>&quot;&gt;<br>
&lt;html xmlns=&quot;<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>&quot;&gt;<br>
&lt;head&gt;<br>
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;<br>
&lt;title&gt;ajax实例&lt;/title&gt;<br>
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;../ext-3.0.0/resources/css/ext-all.css&quot; /&gt;<br>
&lt;script type=&quot;text/javascript&quot; src=&quot;../ext-3.0.0/adapter/ext/ext-base.js&quot;&gt;&lt;/script&gt;<br>
&lt;script type=&quot;text/javascript&quot; src=&quot;../ext-3.0.0/ext-all.js&quot;&gt;&lt;/script&gt;<br>
&lt;script type=&quot;text/javascript&quot;&gt;<br>
Ext.onReady(function(){&nbsp;&nbsp;  <br>
//编码方式<br>
Ext.lib.Ajax.defaultPostHeader += '; charset=utf-8';<br>
//使用表单提示<br>
Ext.QuickTips.init();<br>
Ext.form.Field.prototype.msgTarget = 'side';<br>
<br>
//定义表单<br>
var simple = new Ext.FormPanel({<br>
labelWidth: 75,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  <br>
baseCls: 'x-plain',<br>
defaults: {width: 150},<br>
defaultType: 'textfield',//默认字段类型<br>
<br>
//定义表单元素<br>
items: [{<br>
&nbsp;&nbsp;  fieldLabel: '帐户',<br>
&nbsp;&nbsp;  name: 'name',//元素名称<br>
&nbsp;&nbsp;  //anchor:'95%',//也可用此定义自适应宽度<br>
&nbsp;&nbsp;  allowBlank:false,//不允许为空<br>
&nbsp;&nbsp;  blankText:'帐户不能为空'//错误提示内容<br>
&nbsp;&nbsp;  },{<br>
&nbsp;&nbsp;  inputType:'password',<br>
&nbsp;&nbsp;  fieldLabel: '密码',<br>
&nbsp;&nbsp;  //anchor:'95%',<br>
&nbsp;&nbsp;  name: 'pws',<br>
&nbsp;&nbsp;  allowBlank:false,<br>
&nbsp;&nbsp;  blankText:'密码不能为空'<br>
}],<br>
<br>
buttons: [{<br>
&nbsp;&nbsp;  text: '登陆',<br>
&nbsp;&nbsp;  type: 'submit',<br>
&nbsp;&nbsp;  //定义表单提交事件<br>
&nbsp;&nbsp;  handler:function(){ <br>
&nbsp;&nbsp;  if(simple.form.isValid()){//验证合法后使用加载进度条<br>
&nbsp;&nbsp;&nbsp;  Ext.MessageBox.show({<br>
&nbsp;&nbsp;&nbsp;  title: '请稍等',<br>
&nbsp;&nbsp;&nbsp;  msg: '正在加载...',<br>
&nbsp;&nbsp;&nbsp;  progressText: '',<br>
&nbsp;&nbsp;&nbsp;  width:300,<br>
&nbsp;&nbsp;&nbsp;  progress:true,<br>
&nbsp;&nbsp;&nbsp;  closable:false,<br>
&nbsp;&nbsp;&nbsp;  animEl: 'loding'<br>
&nbsp;&nbsp;&nbsp;  });<br>
&nbsp;&nbsp;&nbsp;  //提交到服务器操作<br>
&nbsp;&nbsp;&nbsp;  simple.form.doAction('submit',{<br>
&nbsp;&nbsp;&nbsp;<a href="http://hi.baidu.com/fc/editor/ ajaxchk.aspx ,//">url:'ajaxchk.aspx',//</a>文件路径<br>
&nbsp;&nbsp;&nbsp;  method:'post',//提交方法post或get <br>
&nbsp;&nbsp;&nbsp;  params:'',&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;  //提交成功的回调函数<br>
&nbsp;&nbsp;&nbsp;  success:function(form,action)<br>
&nbsp;&nbsp;&nbsp;  {<br>
&nbsp;&nbsp;&nbsp;&nbsp;  if (action.result.msg=='ok') {<br>
&nbsp;&nbsp;&nbsp;&nbsp;  //document.location='index.html';<br>
&nbsp;&nbsp;&nbsp;&nbsp;  Ext.MessageBox.alert('登陆成功','ok');<br>
&nbsp;&nbsp;&nbsp;&nbsp;  } else {<br>
&nbsp;&nbsp;&nbsp;&nbsp;  Ext.Msg.alert('登陆错误',action.result.msg);<br>
&nbsp;&nbsp;&nbsp;&nbsp;  }<br>
&nbsp;&nbsp;&nbsp;  },<br>
&nbsp;&nbsp;&nbsp;  //提交失败的回调函数<br>
&nbsp;&nbsp;&nbsp;  failure:function(){<br>
&nbsp;&nbsp;&nbsp;&nbsp;  Ext.Msg.alert('错误','服务器出现错误请稍后再试！');<br>
&nbsp;&nbsp;&nbsp;  }<br>
&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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  <br>
&nbsp;&nbsp;  }<br>
},{<br>
&nbsp;&nbsp;  text: '取消',<br>
&nbsp;&nbsp;  handler:function(){simple.form.reset();}//重置表单<br>
}]<br>
});&nbsp;&nbsp;  <br>
<br>
//定义窗体<br>
win = new Ext.Window({<br>
id:'win',<br>
title:'用户登陆',<br>
layout:'fit',&nbsp;&nbsp;  //之前提到的布局方式fit，自适应布局&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  <br>
width:300,<br>
height:150,<br>
plain:true,<br>
bodyStyle:'padding:5px;', <br>
maximizable:false,//禁止最大化<br>
closeAction:'close',<br>
closable:false,//禁止关闭<br>
collapsible:true,//可折叠<br>
plain: true,<br>
buttonAlign:'center',<br>
items:simple//将表单作为窗体元素嵌套布局<br>
});<br>
win.show();//显示窗体<br>
});<br>
&lt;/script&gt;<br>
&lt;/head&gt;<br>
&lt;body&gt;<br>
&lt;/body&gt;<br>
&lt;/html&gt;<br>
<br>
<br>
<strong><font color="#ff0000">ajaxchk.aspx</font></strong><br>
&lt;%@ Page Language=&quot;C#&quot; AutoEventWireup=&quot;true&quot; CodeFile=&quot;ajaxchk.aspx.cs&quot; Inherits=&quot;admin_ajaxchk&quot; %&gt;<br>
<br>
<strong><font color="#ff0000">ajaxchk.aspx.cs</font></strong><br>
using System;<br>
using System.Collections;<br>
using System.Configuration;<br>
using System.Data;<br>
using System.Linq;<br>
using System.Web;<br>
using System.Web.Security;<br>
using System.Web.UI;<br>
using System.Web.UI.HtmlControls;<br>
using System.Web.UI.WebControls;<br>
using System.Web.UI.WebControls.WebParts;<br>
using System.Xml.Linq;<br>
using System.Data.OleDb;</p>
<p>public partial class admin_ajaxchk : System.Web.UI.Page<br>
{<br>
&nbsp;&nbsp;&nbsp;  protected void Page_Load(object sender, EventArgs e)<br>
&nbsp;&nbsp;&nbsp;  {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  Response.ContentType = &quot;text/html; charset=utf-8&quot;;<br>
&nbsp;&nbsp;  string user = Request.Form[&quot;name&quot;];<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  OleDbConnection Conn = new OleDbConnection();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  Conn = new OleDbConnection(&quot;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|data.mdb;&quot;);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  Conn.Open();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  OleDbCommand cmd;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  cmd = new OleDbCommand(&quot;insert into [db] ([content]) values ('&quot;+user+&quot;')&quot;, Conn);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  cmd.ExecuteScalar();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  Conn.Close();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  Response.Write(&quot;{success:true,msg:'ok'}&quot;);&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;  }<br>
}<br>
<br>
<br>
<font color="#0b5394">注意：<br>
1，web.config中要加上&lt;pages validateRequest=&quot;false&quot;&gt;，说明允许接收html值。<br>
2，输入单引号'会报错，建议接收时replace剔除。<br>
3，英文、中文、数字、常用符号均支持，其他字符未测试。<br>
4，aspx页面只能显示{success:true,msg:'这里的字符随意'}，显示其他字符报错。<br>
5，字段是access备注类型，测试传送65535字节正常，想来post方法的2M极限应该好使。</font></p> <a href="http://hi.baidu.com/wynote/blog/item/ccc495f3e68fb8c10b46e07f.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/wynote/blog/category/Ext">Ext</a>&nbsp;<a href="http://hi.baidu.com/wynote/blog/item/ccc495f3e68fb8c10b46e07f.html#comment">查看评论</a>]]></description>
        <pubDate>2009年11月22日 星期日  10:24</pubDate>
        <category><![CDATA[Ext]]></category>
        <author><![CDATA[notEnded]]></author>
		<guid>http://hi.baidu.com/wynote/blog/item/ccc495f3e68fb8c10b46e07f.html</guid>
</item>

<item>
        <title><![CDATA[直接启动 asp.net development server]]></title>
        <link><![CDATA[http://hi.baidu.com/wynote/blog/item/172613137f49a0daf6039e20.html]]></link>
        <description><![CDATA[
		
		<p>我的计算机是vista家庭版，无法安装iis，工作需要装了vs2008，启动调试后系统托盘出现asp.net development server 这是类似于iis的aspx环境。<br>
<span><img class="blogimg" border="0" small="0" src="http://hiphotos.baidu.com/wynote/pic/item/ecac491657529837962b4314.jpg"><br>
弹出的网页地址栏显示的是：<a href="http://localhost/">http://localhost</a>:端口号/虚拟目录/<br>
这个时候如果不关闭网页，vs是不允许更改网页源代码的；<br>
</span><span>如果直接停止asp.net development server，那么当我修改源代码时，上一次打开的网页是不会变化的，而且当我关闭这个网页在重新打开这个网页时会出现找不到dns错误。<br>
也就是说，我的网页只能用vs开发，并且每做一步都得F5调试一遍。<br>
我最近在做Ext的开发，因为是大量的Javascript代码，所以我选择的是Dreamweaver，并没有使用Visual Studio，在此鄙视一下vs，占资源这么大，而且不支持Ext的IDE接口。<br>
上网搜了一下，终于找到解决方法。<br>
Win+R<br>
cmd<br>
cd 进入下图目录<br>
<span><img class="blogimg" border="0" small="0" src="http://hiphotos.baidu.com/wynote/pic/item/ab04afd30f84852f3bf3cfdc.jpg"><br>
直接执行<br>
<span><img class="blogimg" border="0" small="0" src="http://hiphotos.baidu.com/wynote/pic/item/6bf32f00e63709a8e850cddb.jpg"><br>
这时系统托盘就会出现asp.net development server，打开网页访问localhost就可以了。<br>
查看参数的命令是<br>
<span><img class="blogimg" border="0" small="0" src="http://hiphotos.baidu.com/wynote/pic/item/850d063dba38e22fbba167ba.jpg"><br>
执行该命令弹出<br>
<span><img class="blogimg" border="0" small="0" src="http://hiphotos.baidu.com/wynote/pic/item/a486c80f171fe4056159f385.jpg"><br>
</span>顺便记一下，asp不能运行在asp.net development server下，再次鄙视vs。<br>
<font color="#ff0000"> <br>
cd/ <br>
cd Program Files\Common Files\microsoft shared\DevServer\9.0 <br>
webdev.webserver /port:80 /path:&quot;D:\WebServer\Ext&quot;</font><br>
<br>
在桌面建立一个txt文本文件，写入上面红色的子，保存更改扩展名为bat，双击就可以直接运行了。</span></span></span></span></p> <a href="http://hi.baidu.com/wynote/blog/item/172613137f49a0daf6039e20.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/wynote/blog/category/Windows">Windows</a>&nbsp;<a href="http://hi.baidu.com/wynote/blog/item/172613137f49a0daf6039e20.html#comment">查看评论</a>]]></description>
        <pubDate>2009年11月21日 星期六  22:03</pubDate>
        <category><![CDATA[Windows]]></category>
        <author><![CDATA[notEnded]]></author>
		<guid>http://hi.baidu.com/wynote/blog/item/172613137f49a0daf6039e20.html</guid>
</item>

<item>
        <title><![CDATA[ext3.0上传示例asp.net+c#版]]></title>
        <link><![CDATA[http://hi.baidu.com/wynote/blog/item/2fe90eddc03d133e5882dd2b.html]]></link>
        <description><![CDATA[
		
		<p><span><img class="blogimg" border="0" small="0" src="http://hiphotos.baidu.com/wynote/pic/item/6fc32adea63ff177cdbf1ad3.jpg"></span></p>
<p><span><strong><font color="#ff0000">upload_csharp.html</font></strong><br>
<br>
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>&quot;&gt;<br>
&lt;html xmlns=&quot;<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>&quot;&gt;<br>
&lt;head&gt;<br>
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;<br>
&lt;title&gt;ext&lt;/title&gt;<br>
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;../ext-3.0.0/resources/css/ext-all.css&quot; /&gt;<br>
&lt;script type=&quot;text/javascript&quot; src=&quot;../ext-3.0.0/adapter/ext/ext-base.js&quot;&gt;&lt;/script&gt;<br>
&lt;script type=&quot;text/javascript&quot; src=&quot;../ext-3.0.0/ext-all.js&quot;&gt;&lt;/script&gt;<br>
&lt;script type=&quot;text/javascript&quot;&gt;<br>
Ext.QuickTips.init();&nbsp;&nbsp;  <br>
Ext.form.Field.prototype.msgTarget = 'side';&nbsp;&nbsp;&nbsp;  <br>
Ext.onReady(function() {&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;  var form = new Ext.form.FormPanel({&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  baseCls: 'x-plain',&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  labelWidth: 80,&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  <a href="http://hi.baidu.com/fc/editor/ upload_csharp.aspx ">url:'upload_csharp.aspx'</a>,&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  fileUpload:true,&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  defaultType: 'textfield',&nbsp;&nbsp;  <br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  items: [{&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  xtype: 'textfield',&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  fieldLabel: 'File Name',&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  name: 'userfile',&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  inputType: 'file',&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  allowBlank: false,&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  blankText: 'File can\'t not empty.',&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  anchor: '90%' // anchor width by percentage&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  }]&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;  });&nbsp;&nbsp;  <br>
<br>
&nbsp;&nbsp;&nbsp;  var win = new Ext.Window({&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  title: 'Upload file',&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  width: 400,&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  height:200,&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  minWidth: 300,&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  minHeight: 100,&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  layout: 'fit',&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  plain:true,&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  bodyStyle:'padding:5px;',&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  buttonAlign:'center',&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  items: form,&nbsp;&nbsp;  <br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  buttons: [{&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  text: 'Upload',&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  handler: function() {&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  if(form.form.isValid()){&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  Ext.MessageBox.show({&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;&nbsp;&nbsp;  title: 'Please wait',&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;&nbsp;&nbsp;  msg: 'Uploading...',&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;&nbsp;&nbsp;  progressText: '',&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;&nbsp;&nbsp;  width:300,&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;&nbsp;&nbsp;  progress:true,&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;&nbsp;&nbsp;  closable:false,&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;&nbsp;&nbsp;  animEl: 'loding' <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;  form.getForm().submit({&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;  success: function(form, action){&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;&nbsp;&nbsp;  Ext.Msg.alert('Message from extjs.org.cn',action.result.msg);&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;&nbsp;&nbsp;  win.hide();&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;&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;  failure: function(){&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;&nbsp;  Ext.Msg.alert('Error', 'File upload failure.');&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;  <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;&nbsp;&nbsp;  <br>
&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;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  },{&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  text: 'Close',&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  handler:function(){win.hide();}&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  }]&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;  });&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;  win.show();&nbsp;&nbsp;  <br>
}); </span></p>
<p><span>&lt;/script&gt;<br>
&lt;/head&gt;</span></p>
<p><span>&lt;body&gt;<br>
&lt;p&gt;&lt;a href=&quot;javascript:window.location.reload();&quot;&gt;reload&lt;/a&gt;&lt;/p&gt;<br>
&lt;/body&gt;<br>
&lt;/html&gt;<br>
<br>
<br>
<strong><font color="#ff0000">upload_csharp.aspx</font></strong><br>
<br>
&lt;%@ Page Language=&quot;C#&quot; ContentType=&quot;text/html&quot; ResponseEncoding=&quot;utf-8&quot; %&gt;<br>
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>&quot;&gt;<br>
<br>
&lt;script runat=&quot;server&quot;&gt;&nbsp;&nbsp;  <br>
public void Page_Load(object sender, System.EventArgs e)&nbsp;&nbsp;  <br>
{&nbsp;&nbsp;  <br>
/// 在此处放置用户代码以初始化页面&nbsp;&nbsp;  <br>
//if (this.IsPostBack)&nbsp;&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;  if(this.SaveFiles())&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  Response.Write(&quot;{success:true,msg:'File was successfully uploaded.'}&quot;);&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;  else <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  Response.Write(&quot;{success:true,msg:'Possible file upload attack!'}&quot;);&nbsp;&nbsp;  <br>
}&nbsp;&nbsp;  <br>
<br>
public Boolean SaveFiles()&nbsp;&nbsp;  <br>
{&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  ///'遍历File表单元素&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  HttpFileCollection files = HttpContext.Current.Request.Files;&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  try <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  {&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  for(int iFile = 0; iFile &lt; files.Count; iFile++)&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  {&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  ///'检查文件扩展名字&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  HttpPostedFile postedFile = files[iFile];&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  string fileName, fileExtension;&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  fileName = System.IO.Path.GetFileName(postedFile.FileName);&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  if (fileName != &quot;&quot;)&nbsp;&nbsp;  <br>
&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;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  postedFile.SaveAs(System.Web.HttpContext.Current.Request.MapPath(&quot;upload_files/&quot;) + fileName);&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  }&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  }&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  return true;&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  }&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  catch(System.Exception Ex)&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  {&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  return false;&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  }&nbsp;&nbsp;  <br>
}&nbsp;&nbsp;  <br>
<br>
&lt;/script&gt; <br>
<br>
<strong><font color="#ff0000">upload_files</font></strong><br>
<br>
文件夹名称，拥有everyone的权限。<br>
</span></p> <a href="http://hi.baidu.com/wynote/blog/item/2fe90eddc03d133e5882dd2b.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/wynote/blog/category/Ext">Ext</a>&nbsp;<a href="http://hi.baidu.com/wynote/blog/item/2fe90eddc03d133e5882dd2b.html#comment">查看评论</a>]]></description>
        <pubDate>2009年11月20日 星期五  15:42</pubDate>
        <category><![CDATA[Ext]]></category>
        <author><![CDATA[notEnded]]></author>
		<guid>http://hi.baidu.com/wynote/blog/item/2fe90eddc03d133e5882dd2b.html</guid>
</item>

<item>
        <title><![CDATA[网页视频代码]]></title>
        <link><![CDATA[http://hi.baidu.com/wynote/blog/item/d5a96f2455e1b1398644f933.html]]></link>
        <description><![CDATA[
		
		<div class="cnt" >
<p>&lt;object id=&quot;MediaPlayer&quot; classid=&quot;CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6&quot; codebase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701　<br>
　　standby=&quot;Loading Microsoft? Windows Media? Player components...&quot; type=&quot;application/x-oleobject&quot; width=&quot;252&quot; height=&quot;220&quot;&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &lt;param name=&quot;URL&quot; value=&quot;tc.wmv&quot; valuetype=&quot;ref&quot;&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &lt;param name=&quot;UIMode&quot; value=&quot;full&quot;&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &lt;param name=&quot;AutoStart&quot; value=&quot;true&quot;&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &lt;param name=&quot;Enabled&quot; value=&quot;true&quot;&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &lt;param name=&quot;enableContextMenu&quot; value=&quot;0&quot;&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &lt;param name=&quot;stretchToFit&quot; value=&quot;true&quot;&gt;<br>
&lt;/object&gt;</p>
<p>
<table class="FCK__ShowTableBorders" cellspacing="0" cellpadding="3" width="760" align="center" border="0">
    <tbody>
        <tr>
            <td width="449"><span class="STYLE77"><font color="#ff3333" size="3">一. RM格式（无边框按钮）RealPlayer</font></span></td>
            <td width="281"> </td>
        </tr>
        <tr>
            <td> </td>
            <td> </td>
        </tr>
        <tr>
            <td>
            <p>代码如下：</p>
            <p class="Yyi837"> </p>
            <p> </p>
            </td>
            <td> </td>
        </tr>
        <tr>
            <td>
            <table bordercolor="#0099cc" cellspacing="0" bordercolordark="#ddedfb" cellpadding="5" width="700" border="1">
                <tbody>
                    <tr>
                        <td bgcolor="#ddedfb">
                        <p>&lt;OBJECT ID=video1 CLASSID=&quot;clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA&quot; HEIGHT=288 WIDTH=352&gt;<br>
                        &lt;param name=&quot;_ExtentX&quot; value=&quot;9313&quot;&gt;<br>
                        &lt;param name=&quot;_ExtentY&quot; value=&quot;7620&quot;&gt;<br>
                        &lt;param name=&quot;AUTOSTART&quot; value=&quot;1&quot;&gt;<br>
                        &lt;!--AUTOSTART 不自动播放为0，自动播放为1--&gt;<br>
                        &lt;param name=&quot;SHUFFLE&quot; value=&quot;0&quot;&gt;<br>
                        &lt;param name=&quot;PREFETCH&quot; value=&quot;0&quot;&gt;<br>
                        &lt;param name=&quot;NOLABELS&quot; value=&quot;0&quot;&gt;<br>
                        &lt;param name=&quot;SRC&quot; value=&quot;http://www.gs.xinhuanet.com/old/gansu/huatingzhibo/move/88.rm&quot;&gt;</p>
                        <div class="Yyi837"> </div>
                        <br>
                        &lt;!--播放文件地址--&gt;<br>
                        &lt;param name=&quot;CONTROLS&quot; value=&quot;ImageWindow&quot;&gt;<br>
                        &lt;param name=&quot;CONSOLE&quot; value=&quot;Clip1&quot;&gt;<br>
                        &lt;param name=&quot;LOOP&quot; value=&quot;0&quot;&gt;<br>
                        &lt;param name=&quot;NUMLOOP&quot; value=&quot;0&quot;&gt;<br>
                        &lt;param name=&quot;CENTER&quot; value=&quot;0&quot;&gt;<br>
                        &lt;param name=&quot;MAINTAINASPECT&quot; value=&quot;0&quot;&gt;<br>
                        &lt;param name=&quot;BACKGROUNDCOLOR&quot; value=&quot;#000000&quot;&gt;&lt;embed SRC type=&quot;audio/x-pn-realaudio-plugin&quot; CONSOLE=&quot;Clip1&quot; CONTROLS=&quot;ImageWindow&quot; HEIGHT=&quot;288&quot; WIDTH=&quot;352&quot; AUTOSTART=&quot;false&quot;&gt;<br>
                        &lt;/OBJECT&gt;
                        <p class="Yyi837"> </p>
                        <p> </p>
                        </td>
                    </tr>
                </tbody>
            </table>
            </td>
            <td> </td>
        </tr>
    </tbody>
</table>
<br>
<table class="FCK__ShowTableBorders" cellspacing="0" cellpadding="3" width="760" align="center" border="0">
    <tbody>
        <tr>
            <td width="449"><span class="STYLE77"><font color="#ff3333" size="3">二. RM格式（带边框按钮）RealPlayer</font></span></td>
            <td width="281"> </td>
        </tr>
        <tr>
            <td> </td>
            <td> </td>
        </tr>
        <tr>
            <td>
            <p>代码如下： <span class="Yyi837"><span class="c_ad"> </span></span></p>
            </td>
            <td> </td>
        </tr>
        <tr>
            <td>
            <table bordercolor="#0099cc" cellspacing="0" bordercolordark="#ddedfb" cellpadding="5" width="700" border="1">
                <tbody>
                    <tr>
                        <td bgcolor="#ddedfb">
                        <p>&lt;object id=&quot;vid&quot; classid=&quot;clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA&quot; width=&quot;427&quot; height=&quot;300&quot;&gt;<br>
                        &lt;param name=&quot;_ExtentX&quot; value=&quot;11298&quot; /&gt;<br>
                        &lt;param name=&quot;_ExtentY&quot; value=&quot;7938&quot; /&gt;<br>
                        &lt;param name=&quot;AUTOSTART&quot; value=&quot;-1&quot; /&gt;<br>
                        &lt;!--AUTOSTART 0为打开页面处于待命状态，为-1时打开页面直接播放--&gt;<br>
                        &lt;param name=&quot;SHUFFLE&quot; value=&quot;0&quot; /&gt;<br>
                        &lt;param name=&quot;PREFETCH&quot; value=&quot;0&quot; /&gt;<br>
                        &lt;param name=&quot;NOLABELS&quot; value=&quot;-1&quot; /&gt;<br>
                        &lt;param name=&quot;SRC&quot; value=&quot;http://music.cnvnet.com/mtv/20010618/001.ram&quot;; /&gt;  <br>
                        &lt;!--播放文件地址--&gt;<br>
                        &lt;param name=&quot;CONTROLS&quot; value=&quot;Imagewindow&quot; /&gt;<br>
                        &lt;param name=&quot;CONSOLE&quot; value=&quot;clip1&quot; /&gt;<br>
                        &lt;param name=&quot;LOOP&quot; value=&quot;0&quot; /&gt;<br>
                        &lt;param name=&quot;NUMLOOP&quot; value=&quot;0&quot; /&gt;<br>
                        &lt;param name=&quot;CENTER&quot; value=&quot;0&quot; /&gt;<br>
                        &lt;param name=&quot;MAINTAINASPECT&quot; value=&quot;0&quot; /&gt;<br>
                        &lt;param name=&quot;BACKGROUNDCOLOR&quot; value=&quot;#000000&quot; /&gt;<br>
                        &lt;/object&gt;<br>
                        &lt;br /&gt;<br>
                        &lt;object id=&quot;vid2&quot; classid=&quot;clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA&quot; width=&quot;427&quot; height=&quot;30&quot;&gt;<br>
                        &lt;param name=&quot;_ExtentX&quot; value=&quot;11298&quot; /&gt;<br>
                        &lt;param name=&quot;_ExtentY&quot; value=&quot;794&quot; /&gt;<br>
                        &lt;param name=&quot;AUTOSTART&quot; value=&quot;-1&quot; /&gt;<br>
                        &lt;param name=&quot;SHUFFLE&quot; value=&quot;0&quot; /&gt;<br>
                        &lt;param name=&quot;PREFETCH&quot; value=&quot;0&quot; /&gt; <br>
                        &lt;param name=&quot;NOLABELS&quot; value=&quot;-1&quot; /&gt;<br>
                        &lt;param name=&quot;SRC&quot; value=&quot;http://music.cnvnet.com/mtv/20010618/001.ram&quot;; /&gt;<br>
                        &lt;!--播放文件地址--&gt;<br>
                        &lt;param name=&quot;CONTROLS&quot; value=&quot;ControlPanel&quot; /&gt;<br>
                        &lt;param name=&quot;CONSOLE&quot; value=&quot;clip1&quot; /&gt;<br>
                        &lt;param name=&quot;LOOP&quot; value=&quot;0&quot; /&gt;<br>
                        &lt;param name=&quot;NUMLOOP&quot; value=&quot;0&quot; /&gt;<br>
                        &lt;param name=&quot;CENTER&quot; value=&quot;0&quot; /&gt;<br>
                        &lt;param name=&quot;MAINTAINASPECT&quot; value=&quot;0&quot; /&gt;<br>
                        &lt;param name=&quot;BACKGROUNDCOLOR&quot; value=&quot;#000000&quot; /&gt;<br>
                        &lt;/object&gt;</p>
                        </td>
                    </tr>
                </tbody>
            </table>
            </td>
            <td> </td>
        </tr>
    </tbody>
</table>
<br>
<table class="FCK__ShowTableBorders" cellspacing="0" cellpadding="3" width="760" align="center" border="0">
    <tbody>
        <tr>
            <td width="449"><span class="STYLE77"><font color="#ff3333" size="3">三. WMV格式（带边框按钮）Windows Media Player</font></span></td>
            <td width="281"> </td>
        </tr>
        <tr>
            <td> </td>
            <td> </td>
        </tr>
        <tr>
            <td>
            <p>代码如下：</p>
            <p class="Yyi837"> </p>
            </td>
            <td> </td>
        </tr>
        <tr>
            <td>
            <table bordercolor="#0099cc" cellspacing="0" bordercolordark="#ddedfb" cellpadding="5" width="700" border="1">
                <tbody>
                    <tr>
                        <td bgcolor="#ddedfb">
                        <p>&lt;object classid=clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95 codebase=&quot;http://activex.microsoft.com/activex/controls/mplayer<br>
                        /en/nsmp2inf.cab#Version=6,1,5,217&quot;<br>
                        id=MediaPlayer type=application/x-oleobject width=427 height=329 standby=&quot;Loading Microsoft Windows Media Player components...&quot; VIEWASTEXT align=MIDDLE&gt;<br>
                        &lt;param name=AudioStream value=-1&gt;<br>
                        &lt;param name=AutoSize value=0&gt;<br>
                        &lt;param name=AutoStart value=1&gt;<br>
                        &lt;param name=AnimationAtStart value=0&gt;<br>
                        &lt;param name=AllowScan value=-1&gt;<br>
                        &lt;param name=AllowChangeDisplaySize value=0&gt;<br>
                        &lt;param name=AutoRewind value=0&gt;<br>
                        &lt;param name=Balance value=0&gt;  <br>
                        &lt;param name=BaseURL value=&quot;&quot;&gt;<br>
                        &lt;param name=BufferingTime value=5&gt;<br>
                        &lt;param name=CaptioningID value=&quot;&quot;&gt;<br>
                        &lt;param name=ClickToPlay value=0&gt;<br>
                        &lt;param name=CursorType value=32512&gt;<br>
                        &lt;param name=CurrentPosition value=-1&gt;<br>
                        &lt;param name=CurrentMarker value=0&gt;<br>
                        &lt;param name=DefaultFrame value=1&gt;<br>
                        &lt;param name=DisplayBackColor value=0&gt;<br>
                        &lt;param name=DisplayForeColor value=16777215&gt;<br>
                        &lt;param name=DisplayMode value=0&gt;<br>
                        &lt;param name=DisplaySize value=0&gt;<br>
                        &lt;param name=Enabled value=-1&gt;<br>
                        &lt;param name=EnableContextMenu value=-1&gt;<br>
                        &lt;param name=EnablePositionControls value=0&gt;<br>
                        &lt;param name=EnableFullScreenControls value=0&gt;<br>
                        &lt;param name=EnableTracker value=1&gt;<br>
                        &lt;param name=Filename value=&quot;http://jpkc.scau.edu.cn/nystx/splx/zhang.wmv&quot;&gt;<br>
                        &lt;!--播放文件地址--&gt;<br>
                        &lt;param name=InvokeURLs value=-1&gt;<br>
                        &lt;param name=Language value=-1&gt; <br>
                        &lt;param name=Mute value=0&gt;<br>
                        &lt;param name=PlayCount value=1&gt;<br>
                        &lt;param name=PreviewMode value=0&gt;<br>
                        &lt;param name=Rate value=1&gt;<br>
                        &lt;param name=SelectionStart value=0&gt;<br>
                        &lt;param name=SelectionEnd value=true&gt;<br>
                        &lt;param name=SendOpenStateChangeEvents value=-1&gt;<br>
                        &lt;param name=SendWarningEvents value=-1&gt;<br>
                        &lt;param name=SendErrorEvents value=-1&gt;<br>
                        &lt;param name=SendKeyboardEvents value=0&gt;<br>
                        &lt;param name=SendMouseClickEvents value=0&gt;<br>
                        &lt;param name=SendMouseMoveEvents value=0&gt;<br>
                        &lt;param name=SendPlayStateChangeEvents value=-1&gt;<br>
                        &lt;param name=ShowCaptioning value=0&gt;<br>
                        &lt;param name=ShowControls value=1&gt;<br>
                        &lt;param name=ShowPositionControls value=1&gt;<br>
                        &lt;param name=ShowStatusBar value=1&gt;<br>
                        &lt;param name=ShowTracker value=1&gt;<br>
                        &lt;param name=TransparentAtStart value=0&gt;<br>
                        &lt;param name=VideoBorderWidth value=0&gt;<br>
                        &lt;param name=VideoBorderColor value=0&gt;<br>
                        &lt;param name=VideoBorder3D value=0&gt;</p>
                        <p class="Yyi837"> </p>
                        <br>
                        &lt;param name=Volume value=-1070&gt;<br>
                        &lt;param name=WindowlessVideo value=1&gt;<br>
                        &lt;/object&gt;<br>
                         
                        <p> </p>
                        </td>
                    </tr>
                </tbody>
            </table>
            </td>
            <td> </td>
        </tr>
    </tbody>
</table>
</p>
<p> </p>
<div class="Yyi837"> </div>
<p> </p>
<p>
<table class="FCK__ShowTableBorders" cellspacing="0" cellpadding="3" width="760" align="center" border="0">
    <tbody>
        <tr>
            <td><span class="STYLE82"><font size="3">其他网页视频播放代码</font></span></td>
            <td> </td>
        </tr>
        <tr>
            <td width="449"><span class="STYLE79"><font color="#009900" size="3">一. avi格式 </font></span></td>
            <td width="281"> </td>
        </tr>
        <tr>
            <td>
            <p>代码如下： <font color="#ffffff"><span class="c_ad">http://llf535.net 站长成功网</span></font></p>
            </td>
            <td> </td>
        </tr>
        <tr>
            <td>
            <table bordercolor="#0099cc" cellspacing="0" bordercolordark="#ddedfb" cellpadding="5" width="700" border="1">
                <tbody>
                    <tr>
                        <td bgcolor="#ddedfb">
                        <p>&lt;object id=&quot;video&quot; width=&quot;400&quot; height=&quot;200&quot; border=&quot;0&quot; classid=&quot;clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA&quot;&gt;<br>
                        &lt;param name=&quot;ShowDisplay&quot; value=&quot;0&quot;&gt;<br>
                        &lt;param name=&quot;ShowControls&quot; value=&quot;1&quot;&gt;<br>
                        &lt;param name=&quot;AutoStart&quot; value=&quot;1&quot;&gt;<br>
                        &lt;param name=&quot;AutoRewind&quot; value=&quot;0&quot;&gt;<br>
                        &lt;param name=&quot;PlayCount&quot; value=&quot;0&quot;&gt;<br>
                        &lt;param name=&quot;Appearance value=&quot;0 value=&quot;&quot;&quot;&gt;<br>
                        &lt;param name=&quot;BorderStyle value=&quot;0 value=&quot;&quot;&quot;&gt;<br>
                        &lt;param name=&quot;MovieWindowHeight&quot; value=&quot;240&quot;&gt;</p>
                        <p class="Yyi837"> </p>
                        <br>
                        &lt;param name=&quot;MovieWindowWidth&quot; value=&quot;320&quot;&gt;<br>
                        &lt;param name=&quot;FileName&quot; value=&quot;/Mbar.avi&quot;&gt;<br>
                        &lt;embed width=&quot;400&quot; height=&quot;200&quot; border=&quot;0&quot; showdisplay=&quot;0&quot; showcontrols=&quot;1&quot; autostart=&quot;1&quot; autorewind=&quot;0&quot; playcount=&quot;0&quot; moviewindowheight=&quot;240&quot; moviewindowwidth=&quot;320&quot; filename=&quot;/Mbar.avi&quot; src=&quot;Mbar.avi&quot;&gt;<br>
                        &lt;/embed&gt;<br>
                        &lt;/object&gt;
                        <div class="Yyi837"> </div>
                        <p> </p>
                        </td>
                    </tr>
                </tbody>
            </table>
            </td>
            <td> </td>
        </tr>
    </tbody>
</table>
<table class="FCK__ShowTableBorders" cellspacing="0" cellpadding="3" width="760" align="center" border="0">
    <tbody>
        <tr>
            <td width="449"><span class="STYLE81"><font color="#009933" size="3">二. mpg格式 </font></span></td>
            <td width="281"> </td>
        </tr>
        <tr>
            <td>
            <p>代码如下： <font color="#ffffff"><span class="c_ad">http://llf535.com 成功站长网</span></font></p>
            </td>
            <td> </td>
        </tr>
        <tr>
            <td>
            <table bordercolor="#0099cc" cellspacing="0" bordercolordark="#ddedfb" cellpadding="5" width="700" border="1">
                <tbody>
                    <tr>
                        <td bgcolor="#ddedfb">
                        <p>&lt;object classid=&quot;clsid:05589FA1-C356-11CE-BF01-00AA0055595A&quot; id=&quot;ActiveMovie1&quot; width=&quot;239&quot; height=&quot;250&quot;&gt;<br>
                        &lt;param name=&quot;Appearance&quot; value=&quot;0&quot;&gt;<br>
                        &lt;param name=&quot;AutoStart&quot; value=&quot;-1&quot;&gt;<br>
                        &lt;param name=&quot;AllowChangeDisplayMode&quot; value=&quot;-1&quot;&gt;<br>
                        &lt;param name=&quot;AllowHideDisplay&quot; value=&quot;0&quot;&gt;<br>
                        &lt;param name=&quot;AllowHideControls&quot; value=&quot;-1&quot;&gt;<br>
                        &lt;param name=&quot;AutoRewind&quot; value=&quot;-1&quot;&gt;<br>
                        &lt;param name=&quot;Balance&quot; value=&quot;0&quot;&gt;<br>
                        &lt;param name=&quot;CurrentPosition&quot; value=&quot;0&quot;&gt;</p>
                        <p class="Yyi837"> </p>
                        <br>
                        &lt;param name=&quot;DisplayBackColor&quot; value=&quot;0&quot;&gt;<br>
                        &lt;param name=&quot;DisplayForeColor&quot; value=&quot;16777215&quot;&gt;<br>
                        &lt;param name=&quot;DisplayMode&quot; value=&quot;0&quot;&gt;<br>
                        &lt;param name=&quot;Enabled&quot; value=&quot;-1&quot;&gt;<br>
                        &lt;param name=&quot;EnableContextMenu&quot; value=&quot;-1&quot;&gt;<br>
                        &lt;param name=&quot;EnablePositionControls&quot; value=&quot;-1&quot;&gt;<br>
                        &lt;param name=&quot;EnableSelectionControls&quot; value=&quot;0&quot;&gt;<br>
                        &lt;param name=&quot;EnableTracker&quot; value=&quot;-1&quot;&gt;<br>
                        &lt;param name=&quot;Filename&quot; value=&quot;/mpeg/halali.mpg&quot; valuetype=&quot;ref&quot;&gt;<br>
                        &lt;param name=&quot;FullScreenMode&quot; value=&quot;0&quot;&gt;<br>
                        &lt;param name=&quot;MovieWindowSize&quot; value=&quot;0&quot;&gt;<br>
                        &lt;param name=&quot;PlayCount&quot; value=&quot;1&quot;&gt;<br>
                        &lt;param name=&quot;Rate&quot; value=&quot;1&quot;&gt;<br>
                        &lt;param name=&quot;SelectionStart&quot; value=&quot;-1&quot;&gt; <span class="Yyi837"><span class="c_ad"> </span></span><br>
                        &lt;param name=&quot;SelectionEnd&quot; value=&quot;-1&quot;&gt;<br>
                        &lt;param name=&quot;ShowControls&quot; value=&quot;-1&quot;&gt;<br>
                        &lt;param name=&quot;ShowDisplay&quot; value=&quot;-1&quot;&gt;<br>
                        &lt;param name=&quot;ShowPositionControls&quot; value=&quot;0&quot;&gt;<br>
                        &lt;param name=&quot;ShowTracker&quot; value=&quot;-1&quot;&gt;<br>
                        &lt;param name=&quot;Volume&quot; value=&quot;-480&quot;&gt;<br>
                        &lt;/object&gt; 
                        <p> </p>
                        </td>
                    </tr>
                </tbody>
            </table>
            </td>
            <td> </td>
        </tr>
    </tbody>
</table>
<table class="FCK__ShowTableBorders" cellspacing="0" cellpadding="3" width="760" align="center" border="0">
    <tbody>
        <tr>
            <td width="449"><span class="STYLE81"><font color="#009933" size="3">三. smi格式 </font></span></td>
            <td width="281"> </td>
        </tr>
        <tr>
            <td>
            <p>代码如下：</p>
            <div class="Yyi837"> </div>
            <p> </p>
            </td>
            <td> </td>
        </tr>
        <tr>
            <td>
            <table bordercolor="#0099cc" cellspacing="0" bordercolordark="#ddedfb" cellpadding="5" width="700" border="1">
                <tbody>
                    <tr>
                        <td bgcolor="#ddedfb">
                        <p>&lt;OBJECT id=RVOCX classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA width=240 height=180&gt;<br>
                        &lt;param name=&quot;_ExtentX&quot; value=&quot;6350&quot;&gt;<br>
                        &lt;param name=&quot;_ExtentY&quot; value=&quot;4763&quot;&gt;<br>
                        &lt;param name=&quot;AUTOSTART&quot; value=&quot;-1&quot;&gt;<br>
                        &lt;param name=&quot;SHUFFLE&quot; value=&quot;0&quot;&gt;<br>
                        &lt;param name=&quot;PREFETCH&quot; value=&quot;0&quot;&gt;<br>
                        &lt;param name=&quot;NOLABELS&quot; value=&quot;-1&quot;&gt;<br>
                        &lt;param name=&quot;SRC&quot; value=&quot;rm.rm&quot;&gt;<br>
                        &lt;param name=&quot;CONTROLS&quot; value=&quot;ImageWindow&quot;&gt;<br>
                        &lt;param name=&quot;CONSOLE&quot; value=&quot;console1&quot;&gt;</p>
                        <p class="Yyi837"><span class="c_ad"> </span></p>
                        <br>
                        &lt;param name=&quot;LOOP&quot; value=&quot;0&quot;&gt;<br>
                        &lt;param name=&quot;NUMLOOP&quot; value=&quot;0&quot;&gt;<br>
                        &lt;param name=&quot;CENTER&quot; value=&quot;0&quot;&gt;<br>
                        &lt;param name=&quot;MAINTAINASPECT&quot; value=&quot;0&quot;&gt;<br>
                        &lt;param name=&quot;BACKGROUNDCOLOR&quot; value=&quot;#000000&quot;&gt;&lt;embed src=&quot;real.smi&quot; type=&quot;audio/x-pn-realaudio-plugin&quot; console=&quot;Console1&quot; controls=&quot;ImageWindow&quot; height=&quot;180&quot; width=&quot;240&quot; autostart=&quot;true&quot;&gt;&lt;/OBJECT&gt;</td>
                    </tr>
                </tbody>
            </table>
            </td>
        </tr>
    </tbody>
</table>
</p>
</div>
<br> <a href="http://hi.baidu.com/wynote/blog/item/d5a96f2455e1b1398644f933.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/wynote/blog/category/html%2Bstyle">html+style</a>&nbsp;<a href="http://hi.baidu.com/wynote/blog/item/d5a96f2455e1b1398644f933.html#comment">查看评论</a>]]></description>
        <pubDate>2009年11月20日 星期五  10:05</pubDate>
        <category><![CDATA[html+style]]></category>
        <author><![CDATA[notEnded]]></author>
		<guid>http://hi.baidu.com/wynote/blog/item/d5a96f2455e1b1398644f933.html</guid>
</item>

<item>
        <title><![CDATA[ext2以下版本的编辑器加图片上传功能扩展]]></title>
        <link><![CDATA[http://hi.baidu.com/wynote/blog/item/33da98e94def9a35b90e2da0.html]]></link>
        <description><![CDATA[
		
		<a href="http://www.cnblogs.com/wuliangbo/archive/2009/03/08/1406460.html">http://www.cnblogs.com/wuliangbo/archive/2009/03/08/1406460.html</a><br>
<br>
<a href="http://erikchang.javaeye.com/blog/365430">http://erikchang.javaeye.com/blog/365430</a><br>
<br>
经测试，2.2以下版本正常，3以上出错。 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/wynote/blog/category/Ext">Ext</a>&nbsp;<a href="http://hi.baidu.com/wynote/blog/item/33da98e94def9a35b90e2da0.html#comment">查看评论</a>]]></description>
        <pubDate>2009年11月19日 星期四  16:24</pubDate>
        <category><![CDATA[Ext]]></category>
        <author><![CDATA[notEnded]]></author>
		<guid>http://hi.baidu.com/wynote/blog/item/33da98e94def9a35b90e2da0.html</guid>
</item>

<item>
        <title><![CDATA[CSS实现 自动换行与强制不换行]]></title>
        <link><![CDATA[http://hi.baidu.com/wynote/blog/item/02fbc560a004e5d58cb10de6.html]]></link>
        <description><![CDATA[
		
		自动换行<br>
div{ <br>
word-wrap: break-word; <br>
word-break: normal;
<p>强迫不换行<br>
div{ <br>
white-space:nowrap;<br>
}<br>
 <br>
每段缩进</p>
<p>p{<br>
text-indent:2em;<br>
}</p> 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/wynote/blog/category/html%2Bstyle">html+style</a>&nbsp;<a href="http://hi.baidu.com/wynote/blog/item/02fbc560a004e5d58cb10de6.html#comment">查看评论</a>]]></description>
        <pubDate>2009年11月19日 星期四  14:58</pubDate>
        <category><![CDATA[html+style]]></category>
        <author><![CDATA[notEnded]]></author>
		<guid>http://hi.baidu.com/wynote/blog/item/02fbc560a004e5d58cb10de6.html</guid>
</item>

<item>
        <title><![CDATA[ext+window窗口效果]]></title>
        <link><![CDATA[http://hi.baidu.com/wynote/blog/item/06c4e2ec2c438ddb2e2e211e.html]]></link>
        <description><![CDATA[
		
		<span><img class="blogimg" border="0" small="0" src="http://hiphotos.baidu.com/wynote/pic/item/2b0048c8ff30dc387e3e6fd4.jpg"><br>
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>&quot;&gt;<br>
&lt;html xmlns=&quot;<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>&quot;&gt;<br>
&lt;head&gt;<br>
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;<br>
&lt;title&gt;window&lt;/title&gt;<br>
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;../ext-3.0.0/resources/css/ext-all.css&quot; /&gt;<br>
&lt;script type=&quot;text/javascript&quot; src=&quot;../ext-3.0.0/adapter/ext/ext-base.js&quot;&gt;&lt;/script&gt;<br>
&lt;script type=&quot;text/javascript&quot; src=&quot;../ext-3.0.0/ext-all.js&quot;&gt;&lt;/script&gt;<br>
&lt;script type=&quot;text/javascript&quot;&gt;<br>
Ext.onReady(function(){<br>
// var win = new Ext.Window({<br>
//  title:'在线咨询',<br>
//  el:'win',<br>
//  width:850,<br>
//  height:600,<br>
//  maximizable:true,  // 最大化按钮<br>
//  closable:true,  // 关闭按钮<br>
//  minimizable:true, // 最小化按钮<br>
//  layout:'fit',<br>
//  items:[form]<br>
// });<br>
 var win = new Ext.Window({title:&quot;Hello&quot;,width:300,height:200,html:'&lt;h1&gt;Hello World~!&lt;/h1&gt;'}); <br>
 win.show();<br>
})<br>
&lt;/script&gt;<br>
&lt;/head&gt;<br>
&lt;body&gt;<br>
&lt;dir id=&quot;win&quot;&gt;win&lt;/dir&gt;<br>
&lt;/body&gt;<br>
&lt;/html&gt;<br>
</span> <a href="http://hi.baidu.com/wynote/blog/item/06c4e2ec2c438ddb2e2e211e.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/wynote/blog/category/Ext">Ext</a>&nbsp;<a href="http://hi.baidu.com/wynote/blog/item/06c4e2ec2c438ddb2e2e211e.html#comment">查看评论</a>]]></description>
        <pubDate>2009年11月19日 星期四  14:47</pubDate>
        <category><![CDATA[Ext]]></category>
        <author><![CDATA[notEnded]]></author>
		<guid>http://hi.baidu.com/wynote/blog/item/06c4e2ec2c438ddb2e2e211e.html</guid>
</item>

<item>
        <title><![CDATA[ext网页loading效果+网页未完全加载之前显示loading]]></title>
        <link><![CDATA[http://hi.baidu.com/wynote/blog/item/765f484349c56a1972f05d00.html]]></link>
        <description><![CDATA[
		
		<p><span><img class="blogimg" border="0" small="0" src="http://hiphotos.baidu.com/wynote/pic/item/2b0048c8ff30dc387e3e6fd4.jpg"><br>
</span><span><strong><font color="#990000">在index.html页面中写入<br>
</font></strong>&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>&quot;&gt;<br>
&lt;html xmlns=&quot;<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>&quot;&gt;<br>
&lt;head&gt;<br>
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;<br>
&lt;title&gt;后台管理控制中心&lt;/title&gt;<br>
&lt;style type=&quot;text/css&quot;&gt;<br>
#loading {<br>
position:absolute;<br>
left:45%;<br>
top:40%;<br>
padding:2px;<br>
z-index:20001;<br>
height:auto;<br>
}<br>
#loading .loading-indicator {<br>
background:white;<br>
color:#444;<br>
font:bold 20px tahoma, arial, helvetica;<br>
padding:10px;<br>
margin:0;<br>
height:auto;<br>
}<br>
#loading-msg {<br>
font: normal 18px arial, tahoma, sans-serif;<br>
}<br>
&lt;/style&gt;<br>
&lt;/head&gt;<br>
&lt;body&gt;<br>
&lt;!-- 加载效果 --&gt;<br>
&lt;div id=&quot;loading&quot;&gt;<br>
&lt;div class=&quot;loading-indicator&quot;&gt; &lt;img src=&quot;../ext-3.0.0/resources/images/default/shared/large-loading.gif&quot; width=&quot;32&quot; height=&quot;32&quot; style=&quot;margin-right:8px;float:left;vertical-align:top;&quot;/&gt; &lt;span id=&quot;loading-msg&quot;&gt;Loading ... &lt;/div&gt;<br>
&lt;/div&gt;<br>
&lt;!-- 加载类库 --&gt;<br>
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;../ext-3.0.0/resources/css/ext-all.css&quot; /&gt;<br>
&lt;script type=&quot;text/javascript&quot; src=&quot;../ext-3.0.0/adapter/ext/ext-base.js&quot;&gt;&lt;/script&gt;<br>
&lt;script type=&quot;text/javascript&quot; src=&quot;../ext-3.0.0/ext-all.js&quot;&gt;&lt;/script&gt;<br>
&lt;!-- 退去加载效果 --&gt;<br>
&lt;script type=&quot;text/javascript&quot;&gt;&nbsp;&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp;&nbsp;  Ext.get('loading').setOpacity(0.0,{duration:1.0,callback:function(){this.hide();}});&nbsp;&nbsp;&nbsp;  <br>
&lt;/script&gt;<br>
&lt;!-- 正文界面 --&gt;<br>
&lt;div&gt;<br>
</span><span>正经八百的测试过了，加载了1个2M的txt文件，loading走了5秒才结束，正文是一起输出来的。<br>
&lt;script type=&quot;text/javascript&quot;&gt;<br>
//for(var i=0; i&lt;1; i++)<br>
//{<br>
// document.body.innerHTML += &quot;&lt;iframe src='../ext-3.0.0/examples/index.html'&gt;&lt;/iframe&gt;&quot;; <br>
//}<br>
&lt;/script&gt;<br>
&lt;/div&gt;<br>
&lt;/body&gt;<br>
&lt;/html&gt;<br>
<br>
</span></p> <a href="http://hi.baidu.com/wynote/blog/item/765f484349c56a1972f05d00.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/wynote/blog/category/Ext">Ext</a>&nbsp;<a href="http://hi.baidu.com/wynote/blog/item/765f484349c56a1972f05d00.html#comment">查看评论</a>]]></description>
        <pubDate>2009年11月19日 星期四  14:18</pubDate>
        <category><![CDATA[Ext]]></category>
        <author><![CDATA[notEnded]]></author>
		<guid>http://hi.baidu.com/wynote/blog/item/765f484349c56a1972f05d00.html</guid>
</item>

<item>
        <title><![CDATA[字符，字节和编码(2)]]></title>
        <link><![CDATA[http://hi.baidu.com/wynote/blog/item/d5aa9533c52450f21b4cff52.html]]></link>
        <description><![CDATA[
		
		<h4><a name="misunderstand"></a>3. 几种误解，以及乱码产生的原因和解决办法</h4>
<h5>3.1 容易产生的误解</h5>
<p>
<table cellspacing="0" cellpadding="3" border="0">
    <tbody>
        <tr>
            <td class="top_1">　</td>
            <td class="top_2" align="center"><strong>对编码的误解</strong></td>
        </tr>
        <tr>
            <td class="con_1" nowrap="nowrap" align="center">误解一</td>
            <td class="con_2">在将&ldquo;字节串&rdquo;转化成&ldquo;UNICODE 字符串&rdquo;时，比如在读取文本文件时，或者通过网络传输文本时，容易将&ldquo;字节串&rdquo;简单地作为<strong>单字节字符串</strong>，采用每&ldquo;一个字节&rdquo;就是&ldquo;一个字符&rdquo;的方法进行转化。<br>
            <br>
            而实际上，在非英文的环境中，应该将&ldquo;字节串&rdquo;作为 ANSI 字符串，采用适当的编码来得到 UNICODE 字符串，有可能&ldquo;多个字节&rdquo;才能得到&ldquo;一个字符&rdquo;。<br>
            <br>
            通常，一直在英文环境下做开发的程序员们，容易有这种误解。</td>
        </tr>
        <tr>
            <td class="bot_1" nowrap="nowrap" align="center">误解二</td>
            <td class="bot_2">在 DOS，Windows 98 等非 UNICODE 环境下，字符串都是以 ANSI 编码的字节形式存在的。这种以字节形式存在的字符串，必须知道是哪种编码才能被正确地使用。这使我们形成了一个惯性思维：&ldquo;字符串的编码&rdquo;。<br>
            <br>
            当 UNICODE 被支持后，Java 中的 String 是以字符的&ldquo;序号&rdquo;来存储的，不是以&ldquo;某种编码的字节&rdquo;来存储的，因此已经不存在&ldquo;字符串的编码&rdquo;这个概念了。只有在&ldquo;字符串&rdquo;与&ldquo;字节串&rdquo;转化时，或者，将一个&ldquo;字节串&rdquo;当成一个 ANSI 字符串时，才有编码的概念。<br>
            <br>
            不少的人都有这个误解。</td>
        </tr>
    </tbody>
</table>
</p>
<p>第一种误解，往往是导致乱码产生的原因。第二种误解，往往导致本来容易纠正的乱码问题变得更复杂。</p>
<p>在这里，我们可以看到，其中所讲的&ldquo;误解一&rdquo;，即采用每&ldquo;一个字节&rdquo;就是&ldquo;一个字符&rdquo;的转化方法，实际上也就等同于采用 iso-8859-1 进行转化。因此，我们常常使用 bytes = string.getBytes(&quot;iso-8859-1&quot;) 来进行逆向操作，得到原始的&ldquo;字节串&rdquo;。然后再使用正确的 ANSI 编码，比如 string = new String(bytes, &quot;GB2312&quot;)，来得到正确的&ldquo;UNICODE 字符串&rdquo;。</p>
<p>
<table cellspacing="0" cellpadding="0" width="100%" border="0">
    <tbody>
        <tr valign="top">
            <td align="right" width="100%"><img height="1" src="http://www.regexlab.com/images/blue_rule.gif" width="100%" border="0"></td>
        </tr>
        <tr valign="top">
            <td align="right" width="100%">
            <table cellspacing="0" cellpadding="0">
                <tbody>
                    <tr align="right">
                        <td>
                        <table cellspacing="0" cellpadding="0" border="0">
                            <tbody>
                                <tr>
                                    <td valign="middle"><img height="16" src="http://www.regexlab.com/images/u_bold.gif" width="16" border="0"></td>
                                    <td valign="top" align="right"> </td>
                                </tr>
                            </tbody>
                        </table>
                        </td>
                    </tr>
                </tbody>
            </table>
            </td>
        </tr>
    </tbody>
</table>
</p>
<h5><a name="instances"></a>3.2 非 UNICODE 程序在不同语言环境间移植时的乱码</h5>
<p>非 UNICODE 程序中的字符串，都是以某种 ANSI 编码形式存在的。如果程序运行时的语言环境与开发时的语言环境不同，将会导致 ANSI 字符串的显示失败。</p>
<p>比如，在日文环境下开发的非 UNICODE 的日文程序界面，拿到中文环境下运行时，界面上将显示乱码。如果这个日文程序界面改为采用 UNICODE 来记录字符串，那么当在中文环境下运行时，界面上将可以显示正常的日文。</p>
<p>由于客观原因，有时候我们必须在中文操作系统下运行非 UNICODE 的日文软件，这时我们可以采用一些工具，比如，南极星，AppLocale 等，暂时的模拟不同的语言环境。</p>
<p>
<table cellspacing="0" cellpadding="0" width="100%" border="0">
    <tbody>
        <tr valign="top">
            <td align="right" width="100%"><img height="1" src="http://www.regexlab.com/images/blue_rule.gif" width="100%" border="0"></td>
        </tr>
        <tr valign="top">
            <td align="right" width="100%">
            <table cellspacing="0" cellpadding="0">
                <tbody>
                    <tr align="right">
                        <td>
                        <table cellspacing="0" cellpadding="0" border="0">
                            <tbody>
                                <tr>
                                    <td valign="middle"><img height="16" src="http://www.regexlab.com/images/u_bold.gif" width="16" border="0"></td>
                                    <td valign="top" align="right"> </td>
                                </tr>
                            </tbody>
                        </table>
                        </td>
                    </tr>
                </tbody>
            </table>
            </td>
        </tr>
    </tbody>
</table>
</p>
<h5>3.3 网页提交字符串</h5>
<p>当页面中的表单提交字符串时，首先把字符串按照当前页面的编码，转化成字节串。然后再将每个字节转化成 &quot;%XX&quot; 的格式提交到 Web 服务器。比如，一个编码为 GB2312 的页面，提交 &quot;中&quot; 这个字符串时，提交给服务器的内容为 &quot;%D6%D0&quot;。</p>
<p>在服务器端，Web 服务器把收到的 &quot;%D6%D0&quot; 转化成 [0xD6, 0xD0] 两个字节，然后再根据 GB2312 编码规则得到 &quot;中&quot; 字。</p>
<p>在 Tomcat 服务器中，request.getParameter() 得到乱码时，常常是因为前面提到的&ldquo;误解一&rdquo;造成的。默认情况下，当提交 &quot;%D6%D0&quot; 给 Tomcat 服务器时，request.getParameter() 将返回 [0x00D6, 0x00D0] 两个 UNICODE 字符，而不是返回一个 &quot;中&quot; 字符。因此，我们需要使用 bytes = string.getBytes(&quot;iso-8859-1&quot;) 得到原始的字节串，再用 string = new String(bytes, &quot;GB2312&quot;) 重新得到正确的字符串 &quot;中&quot;。</p>
<p>
<table cellspacing="0" cellpadding="0" width="100%" border="0">
    <tbody>
        <tr valign="top">
            <td align="right" width="100%"><img height="1" src="http://www.regexlab.com/images/blue_rule.gif" width="100%" border="0"></td>
        </tr>
        <tr valign="top">
            <td align="right" width="100%">
            <table cellspacing="0" cellpadding="0">
                <tbody>
                    <tr align="right">
                        <td>
                        <table cellspacing="0" cellpadding="0" border="0">
                            <tbody>
                                <tr>
                                    <td valign="middle"><img height="16" src="http://www.regexlab.com/images/u_bold.gif" width="16" border="0"></td>
                                    <td valign="top" align="right"> </td>
                                </tr>
                            </tbody>
                        </table>
                        </td>
                    </tr>
                </tbody>
            </table>
            </td>
        </tr>
    </tbody>
</table>
</p>
<h5>3.4 从数据库读取字符串</h5>
<p>通过数据库客户端（比如 ODBC 或 JDBC）从数据库服务器中读取字符串时，客户端需要从服务器获知所使用的 ANSI 编码。当数据库服务器发送字节流给客户端时，客户端负责将字节流按照正确的编码转化成 UNICODE 字符串。</p>
<p>如果从数据库读取字符串时得到乱码，而数据库中存放的数据又是正确的，那么往往还是因为前面提到的&ldquo;误解一&rdquo;造成的。解决的办法还是通过 string = new String( string.getBytes(&quot;iso-8859-1&quot;), &quot;GB2312&quot;) 的方法，重新得到原始的字节串，再重新使用正确的编码转化成字符串。</p>
<p>
<table cellspacing="0" cellpadding="0" width="100%" border="0">
    <tbody>
        <tr valign="top">
            <td align="right" width="100%"><img height="1" src="http://www.regexlab.com/images/blue_rule.gif" width="100%" border="0"></td>
        </tr>
        <tr valign="top">
            <td align="right" width="100%">
            <table cellspacing="0" cellpadding="0">
                <tbody>
                    <tr align="right">
                        <td>
                        <table cellspacing="0" cellpadding="0" border="0">
                            <tbody>
                                <tr>
                                    <td valign="middle"><img height="16" src="http://www.regexlab.com/images/u_bold.gif" width="16" border="0"></td>
                                    <td valign="top" align="right"> </td>
                                </tr>
                            </tbody>
                        </table>
                        </td>
                    </tr>
                </tbody>
            </table>
            </td>
        </tr>
    </tbody>
</table>
</p>
<h5>3.5 电子邮件中的字符串</h5>
<p>当一段 Text 或者 HTML 通过电子邮件传送时，发送的内容首先通过一种指定的<strong>字符编码</strong>转化成&ldquo;字节串&rdquo;，然后再把&ldquo;字节串&rdquo;通过一种指定的<strong>传输编码</strong>（Content-Transfer-Encoding）进行转化得到另一串&ldquo;字节串&rdquo;。比如，打开一封电子邮件源代码，可以看到类似的内容：</p>
<p>
<table cellspacing="0" cellpadding="6" width="100%" bgcolor="#eeeeee" border="1">
    <tbody>
        <tr>
            <td class="code">Content-Type: text/plain;<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  <font color="#ff0000">charset=&quot;gb2312&quot;</font><br>
            <font color="#ff0000">Content-Transfer-Encoding: base64</font><br>
            <br>
            sbG+qcrQuqO17cf4yee74bGjz9W7+b3wudzA7dbQ0MQNCg0KvPKzxqO6uqO17cnnsaPW0NDEDQoNCg==</td>
        </tr>
    </tbody>
</table>
</p>
<p>最常用的 Content-Transfer-Encoding 有 Base64 和 Quoted-Printable 两种。在对二进制文件或者中文文本进行转化时，Base64 得到的&ldquo;字节串&rdquo;比 Quoted-Printable 更短。在对英文文本进行转化时，Quoted-Printable 得到的&ldquo;字节串&rdquo;比 Base64 更短。</p>
<p>邮件的标题，用了一种更简短的格式来标注&ldquo;字符编码&rdquo;和&ldquo;传输编码&rdquo;。比如，标题内容为 &quot;中&quot;，则在邮件源代码中表示为：</p>
<p>
<table cellspacing="0" cellpadding="6" width="100%" bgcolor="#eeeeee" border="1">
    <tbody>
        <tr>
            <td class="code"><font color="#339933"><span class="rem">// 正确的标题格式</span><br>
            </font>Subject: <span style="background-color: #ffff00">=?</span>GB2312<span style="background-color: #ffff00">?B?</span>1tA=<span style="background-color: #ffff00">?=</span></td>
        </tr>
    </tbody>
</table>
</p>
<p>其中，</p>
<ul>
    <li>第一个&ldquo;=?&rdquo;与&ldquo;?&rdquo;中间的部分指定了字符编码，在这个例子中指定的是 GB2312。</li>
    <li>&ldquo;?&rdquo;与&ldquo;?&rdquo;中间的&ldquo;B&rdquo;代表 Base64。如果是&ldquo;Q&rdquo;则代表 Quoted-Printable。</li>
    <li>最后&ldquo;?&rdquo;与&ldquo;?=&rdquo;之间的部分，就是经过 GB2312 转化成字节串，再经过 Base64 转化后的标题内容。</li>
</ul>
<p>如果&ldquo;传输编码&rdquo;改为 Quoted-Printable，同样，如果标题内容为 &quot;中&quot;：</p>
<p>
<table cellspacing="0" cellpadding="6" width="100%" bgcolor="#eeeeee" border="1">
    <tbody>
        <tr>
            <td class="code"><font color="#339933"><span class="rem">// 正确的标题格式</span><br>
            </font>Subject: <span style="background-color: #ffff00">=?</span>GB2312<span style="background-color: #ffff00">?Q?</span>=D6=D0<span style="background-color: #ffff00">?=</span></td>
        </tr>
    </tbody>
</table>
</p>
<p>如果阅读邮件时出现乱码，一般是因为&ldquo;字符编码&rdquo;或&ldquo;传输编码&rdquo;指定有误，或者是没有指定。比如，有的发邮件组件在发送邮件时，标题 &quot;中&quot;：</p>
<p>
<table cellspacing="0" cellpadding="6" width="100%" bgcolor="#eeeeee" border="1">
    <tbody>
        <tr>
            <td class="code"><font color="#339933"><span class="rem">// 错误的标题格式</span><br>
            </font>Subject: <span style="background-color: #ffff00">=?</span><font color="#ff0000">ISO-8859-1</font><span style="background-color: #ffff00">?Q?</span>=D6=D0<span style="background-color: #ffff00">?=</span></td>
        </tr>
    </tbody>
</table>
</p>
<p>这样的表示，实际上是明确指明了标题为 [0x00D6, 0x00D0]，即 &quot;&Ouml;&ETH;&quot;，而不是 &quot;中&quot;。</p>
<p>
<table cellspacing="0" cellpadding="0" width="100%" border="0">
    <tbody>
        <tr valign="top">
            <td align="right" width="100%"><img height="1" src="http://www.regexlab.com/images/blue_rule.gif" width="100%" border="0"></td>
        </tr>
        <tr valign="top">
            <td align="right" width="100%">
            <table cellspacing="0" cellpadding="0">
                <tbody>
                    <tr align="right">
                        <td>
                        <table cellspacing="0" cellpadding="0" border="0">
                            <tbody>
                                <tr>
                                    <td valign="middle"><img height="16" src="http://www.regexlab.com/images/u_bold.gif" width="16" border="0"></td>
                                    <td valign="top" align="right"> </td>
                                </tr>
                            </tbody>
                        </table>
                        </td>
                    </tr>
                </tbody>
            </table>
            </td>
        </tr>
    </tbody>
</table>
</p>
<h4><a name="correct"></a>4. 几种错误理解的纠正</h4>
<h5>误解：&ldquo;ISO-8859-1 是国际编码？&rdquo;</h5>
<p>非也。iso-8859-1 只是单字节字符集中最简单的一种，也就是&ldquo;字节编号&rdquo;与&ldquo;UNICODE 字符编号&rdquo;一致的那种编码规则。当我们要把一个&ldquo;字节串&rdquo;转化成&ldquo;字符串&rdquo;，而又不知道它是哪一种 ANSI 编码时，先暂时地把&ldquo;每一个字节&rdquo;作为&ldquo;一个字符&rdquo;进行转化，不会造成信息丢失。然后再使用 bytes = string.getBytes(&quot;iso-8859-1&quot;) 的方法可恢复到原始的字节串。</p>
<h5>误解：&ldquo;Java 中，怎样知道某个字符串的内码？&rdquo;</h5>
<p>Java 中，字符串类 java.lang.String 处理的是 UNICODE 字符串，不是 ANSI 字符串。我们只需要把字符串作为&ldquo;抽象的符号的串&rdquo;来看待。因此不存在字符串的内码的问题。</p> <a href="http://hi.baidu.com/wynote/blog/item/d5aa9533c52450f21b4cff52.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/wynote/blog/category/%CD%F8%D5%BE%B7%FE%CE%F1%C6%F7">网站服务器</a>&nbsp;<a href="http://hi.baidu.com/wynote/blog/item/d5aa9533c52450f21b4cff52.html#comment">查看评论</a>]]></description>
        <pubDate>2009年11月19日 星期四  13:10</pubDate>
        <category><![CDATA[网站服务器]]></category>
        <author><![CDATA[notEnded]]></author>
		<guid>http://hi.baidu.com/wynote/blog/item/d5aa9533c52450f21b4cff52.html</guid>
</item>


</channel>
</rss>