⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 代码清单2-20.htm

📁 《深入浅出Ajax》 源代码
💻 HTM
📖 第 1 页 / 共 4 页
字号:
lang=EN-US style='font-size:9.0pt;mso-fareast-font-family:仿宋_GB2312;mso-bidi-font-family:
"Times New Roman"'>#025<span style='mso-spacerun:yes'>&nbsp; </span><span
style='mso-tab-count:7'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}
else { //</span><span style='font-size:9.0pt;font-family:仿宋_GB2312;mso-ascii-font-family:
"Times New Roman";mso-hansi-font-family:"MS Reference Sans Serif";mso-bidi-font-family:
"Times New Roman"'>页面不正常</span><span lang=EN-US style='font-size:9.0pt;
mso-fareast-font-family:仿宋_GB2312;mso-bidi-font-family:"Times New Roman"'> <o:p></o:p></span></p>

<p class=a style='margin-left:0cm;text-align:justify;text-justify:inter-ideograph;
text-indent:18.0pt;mso-char-indent-count:2.0;background:#E6E6E6'><span
lang=EN-US style='font-size:9.0pt;mso-fareast-font-family:仿宋_GB2312;mso-bidi-font-family:
"Times New Roman"'>#026<span style='mso-spacerun:yes'>&nbsp; </span><span
style='mso-tab-count:7'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>alert(&quot;</span><span
style='font-size:9.0pt;font-family:仿宋_GB2312;mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"MS Reference Sans Serif";mso-bidi-font-family:"Times New Roman"'>您请求的页面有异常</span><span
lang=EN-US style='font-size:9.0pt;mso-fareast-font-family:仿宋_GB2312;mso-bidi-font-family:
"Times New Roman"'> &quot;); <o:p></o:p></span></p>

<p class=a style='margin-left:0cm;text-align:justify;text-justify:inter-ideograph;
text-indent:18.0pt;mso-char-indent-count:2.0;background:#E6E6E6'><span
lang=EN-US style='font-size:9.0pt;mso-fareast-font-family:仿宋_GB2312;mso-bidi-font-family:
"Times New Roman"'>#027<span style='mso-spacerun:yes'>&nbsp; </span><span
style='mso-tab-count:7'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}<span
style='mso-spacerun:yes'>&nbsp; </span><o:p></o:p></span></p>

<p class=a style='margin-left:0cm;text-align:justify;text-justify:inter-ideograph;
text-indent:18.0pt;mso-char-indent-count:2.0;background:#E6E6E6'><span
lang=EN-US style='font-size:9.0pt;mso-fareast-font-family:仿宋_GB2312;mso-bidi-font-family:
"Times New Roman"'>#028<span style='mso-spacerun:yes'>&nbsp; </span><span
style='mso-tab-count:5'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}
else { <o:p></o:p></span></p>

<p class=a style='margin-left:0cm;text-align:justify;text-justify:inter-ideograph;
text-indent:18.0pt;mso-char-indent-count:2.0;background:#E6E6E6'><span
lang=EN-US style='font-size:9.0pt;mso-fareast-font-family:仿宋_GB2312;mso-bidi-font-family:
"Times New Roman"'>#029<span style='mso-spacerun:yes'>&nbsp; </span><span
style='mso-tab-count:5'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;</span>//<span
style='mso-spacerun:yes'>&nbsp; </span></span><span style='font-size:9.0pt;
font-family:仿宋_GB2312;mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:
"MS Reference Sans Serif";mso-bidi-font-family:"Times New Roman"'>信息还没有返回,等待</span><span
lang=EN-US style='font-size:9.0pt;mso-fareast-font-family:仿宋_GB2312;mso-bidi-font-family:
"Times New Roman"'> <o:p></o:p></span></p>

<p class=a style='margin-left:0cm;text-align:justify;text-justify:inter-ideograph;
text-indent:18.0pt;mso-char-indent-count:2.0;background:#E6E6E6'><span
lang=EN-US style='font-size:9.0pt;mso-fareast-font-family:仿宋_GB2312;mso-bidi-font-family:
"Times New Roman"'>#030<span style='mso-spacerun:yes'>&nbsp; </span><span
style='mso-tab-count:5'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}
<o:p></o:p></span></p>

<p class=a style='margin-left:0cm;text-align:justify;text-justify:inter-ideograph;
text-indent:18.0pt;mso-char-indent-count:2.0;background:#E6E6E6'><span
lang=EN-US style='font-size:9.0pt;mso-fareast-font-family:仿宋_GB2312;mso-bidi-font-family:
"Times New Roman"'>#031<span
style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>}<o:p></o:p></span></p>

<p class=a style='margin-left:0cm;text-align:justify;text-justify:inter-ideograph;
text-indent:18.0pt;mso-char-indent-count:2.0;background:#E6E6E6'><span
lang=EN-US style='font-size:9.0pt;mso-fareast-font-family:仿宋_GB2312;mso-bidi-font-family:
"Times New Roman"'>#032<span
style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>function <span class=SpellE>creatXMLReqFile</span>(){<o:p></o:p></span></p>

<p class=a style='margin-left:0cm;text-align:justify;text-justify:inter-ideograph;
text-indent:18.0pt;mso-char-indent-count:2.0;background:#E6E6E6'><span
lang=EN-US style='font-size:9.0pt;mso-fareast-font-family:仿宋_GB2312;mso-bidi-font-family:
"Times New Roman"'>#033<span
style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style='mso-tab-count:1'> </span><span class=SpellE>var</span> <span
class=SpellE>reqStr</span> = '&lt;<span class=SpellE>x:TransferReq</span>'+<o:p></o:p></span></p>

<p class=a style='margin-left:0cm;text-align:justify;text-justify:inter-ideograph;
text-indent:18.0pt;mso-char-indent-count:2.0;background:#E6E6E6'><span
lang=EN-US style='font-size:9.0pt;mso-fareast-font-family:仿宋_GB2312;mso-bidi-font-family:
"Times New Roman"'>#034<span
style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style='mso-tab-count:1'> </span>' <span class=SpellE>xmlns:x</span>=&quot;<span
class=SpellE>urn:examples-org:banking</span>&quot;&gt;&lt;chapters&gt;';<o:p></o:p></span></p>

<p class=a style='margin-left:0cm;text-align:justify;text-justify:inter-ideograph;
text-indent:18.0pt;mso-char-indent-count:2.0;background:#E6E6E6'><span
lang=EN-US style='font-size:9.0pt;mso-fareast-font-family:仿宋_GB2312;mso-bidi-font-family:
"Times New Roman"'>#035<span
style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style='mso-tab-count:1'> </span><span class=SpellE>var</span> <span
class=SpellE>checkboxArray</span> = <span class=SpellE>document.getElementsByName</span>(&quot;<span
class=SpellE>chooseChapter</span>&quot;);<o:p></o:p></span></p>

<p class=a style='margin-left:0cm;text-align:justify;text-justify:inter-ideograph;
text-indent:18.0pt;mso-char-indent-count:2.0;background:#E6E6E6'><span
lang=EN-US style='font-size:9.0pt;mso-fareast-font-family:仿宋_GB2312;mso-bidi-font-family:
"Times New Roman"'>#036<span
style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style='mso-tab-count:1'> </span>for(<span class=SpellE>var</span>
count=0;count&lt;<span class=SpellE>checkboxArray.length;count</span>++){<o:p></o:p></span></p>

<p class=a style='margin-left:0cm;text-align:justify;text-justify:inter-ideograph;
text-indent:18.0pt;mso-char-indent-count:2.0;background:#E6E6E6'><span
lang=EN-US style='font-size:9.0pt;mso-fareast-font-family:仿宋_GB2312;mso-bidi-font-family:
"Times New Roman"'>#037<span
style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style='mso-tab-count:2'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>if(<span
class=SpellE>checkboxArray</span>[count].checked){<o:p></o:p></span></p>

<p class=a style='margin-left:0cm;text-align:justify;text-justify:inter-ideograph;
text-indent:18.0pt;mso-char-indent-count:2.0;background:#E6E6E6'><span
lang=EN-US style='font-size:9.0pt;mso-fareast-font-family:仿宋_GB2312;mso-bidi-font-family:
"Times New Roman"'>#038<span
style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style='mso-tab-count:3'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
class=SpellE>reqStr</span> += &quot;&lt;chapter&gt;&quot; + <span class=SpellE>checkboxArray</span>[count].value
+ &quot;&lt;/chapter&gt;&quot;;<o:p></o:p></span></p>

<p class=a style='margin-left:0cm;text-align:justify;text-justify:inter-ideograph;
text-indent:18.0pt;mso-char-indent-count:2.0;background:#E6E6E6'><span
lang=EN-US style='font-size:9.0pt;mso-fareast-font-family:仿宋_GB2312;mso-bidi-font-family:
"Times New Roman"'>#039<span
style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style='mso-tab-count:2'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}<o:p></o:p></span></p>

<p class=a style='margin-left:0cm;text-align:justify;text-justify:inter-ideograph;
text-indent:18.0pt;mso-char-indent-count:2.0;background:#E6E6E6'><span
lang=EN-US style='font-size:9.0pt;mso-fareast-font-family:仿宋_GB2312;mso-bidi-font-family:
"Times New Roman"'>#040<span
style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style='mso-tab-count:1'> </span>}<o:p></o:p></span></p>

<p class=a style='margin-left:0cm;text-align:justify;text-justify:inter-ideograph;
text-indent:18.0pt;mso-char-indent-count:2.0;background:#E6E6E6'><span
lang=EN-US style='font-size:9.0pt;mso-fareast-font-family:仿宋_GB2312;mso-bidi-font-family:
"Times New Roman"'>#041<span
style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style='mso-tab-count:1'> </span><span class=SpellE>reqStr</span>
+= &quot;&lt;/chapters&gt;&lt;/<span class=SpellE>x:TransferReq</span>&gt;&quot;;<o:p></o:p></span></p>

<p class=a style='margin-left:0cm;text-align:justify;text-justify:inter-ideograph;
text-indent:18.0pt;mso-char-indent-count:2.0;background:#E6E6E6'><span
lang=EN-US style='font-size:9.0pt;mso-fareast-font-family:仿宋_GB2312;mso-bidi-font-family:
"Times New Roman"'>#042<span
style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style='mso-tab-count:1'> </span><span class=SpellE>var</span> <span
class=SpellE>soapData</span> = '&lt;SOAP-<span class=SpellE>ENV:Envelope</span>
\n' +<o:p></o:p></span></p>

<p class=a style='margin-left:0cm;text-align:justify;text-justify:inter-ideograph;
text-indent:18.0pt;mso-char-indent-count:2.0;background:#E6E6E6'><span lang=DE
style='font-size:9.0pt;mso-fareast-font-family:仿宋_GB2312;mso-bidi-font-family:
"Times New Roman";mso-ansi-language:DE'>#043<span
style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>'xmlns:SOAP-ENV=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;
\n' +<o:p></o:p></span></p>

<p class=a style='margin-left:0cm;text-align:justify;text-justify:inter-ideograph;
text-indent:18.0pt;mso-char-indent-count:2.0;background:#E6E6E6'><span lang=DE
style='font-size:9.0pt;mso-fareast-font-family:仿宋_GB2312;mso-bidi-font-family:
"Times New Roman";mso-ansi-language:DE'>#044<span
style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>'xmlns:SOAP-ENC=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;
\n' +<o:p></o:p></span></p>

<p class=a style='margin-left:0cm;text-align:justify;text-justify:inter-ideograph;
text-indent:18.0pt;mso-char-indent-count:2.0;background:#E6E6E6'><span lang=DE
style='font-size:9.0pt;mso-fareast-font-family:仿宋_GB2312;mso-bidi-font-family:
"Times New Roman";mso-ansi-language:DE'>#045<span
style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>'xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; \n' +<o:p></o:p></span></p>

<p class=a style='margin-left:0cm;text-align:justify;text-justify:inter-ideograph;
text-indent:18.0pt;mso-char-indent-count:2.0;background:#E6E6E6'><span lang=DE
style='font-size:9.0pt;mso-fareast-font-family:仿宋_GB2312;mso-bidi-font-family:
"Times New Roman";mso-ansi-language:DE'>#046<span
style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>'xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;\n' +<o:p></o:p></span></p>

<p class=a style='margin-left:0cm;text-align:justify;text-justify:inter-ideograph;
text-indent:18.0pt;mso-char-indent-count:2.0;background:#E6E6E6'><span
lang=EN-US style='font-size:9.0pt;mso-fareast-font-family:仿宋_GB2312;mso-bidi-font-family:
"Times New Roman"'>#047<span
style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>'&lt;SOAP-<span class=SpellE>ENV:Body</span>&gt;\n' +<o:p></o:p></span></p>

<p class=a style='margin-left:0cm;text-align:justify;text-justify:inter-ideograph;
text-indent:18.0pt;mso-char-indent-count:2.0;background:#E6E6E6'><span
lang=EN-US style='font-size:9.0pt;mso-fareast-font-family:仿宋_GB2312;mso-bidi-font-family:
"Times New Roman"'>#048<span
style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span class=SpellE>reqStr</span> +<o:p></o:p></span></p>

<p class=a style='margin-left:0cm;text-align:justify;text-justify:inter-ideograph;
text-indent:18.0pt;mso-char-indent-count:2.0;background:#E6E6E6'><span

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -