📄 代码清单4-6.htm
字号:
"Times New Roman"'>#002<span style='mso-spacerun:yes'> </span><span
style='mso-tab-count:1'> </span><head><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"'>#003<span style='mso-spacerun:yes'> </span><span
style='mso-tab-count:2'> </span><script
<span class=SpellE>src</span>='/<span class=SpellE>ajaxstudy/dwr/interface/TestMethod.js</span>'></script><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"'>#004<span style='mso-spacerun:yes'> </span><span
style='mso-tab-count:2'> </span><script
<span class=SpellE>src</span>='/<span class=SpellE>ajaxstudy/dwr/engine.js</span>'></script><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"'>#005<span style='mso-spacerun:yes'> </span><span
style='mso-tab-count:2'> </span><script><span
style='mso-tab-count:2'> </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"'>#006<span style='mso-spacerun:yes'> </span><span
style='mso-tab-count:2'> </span><span
class=SpellE>var</span> <span class=SpellE>simpleCallBack</span> = function <span
class=SpellE><span class=GramE>getString</span></span><span class=GramE>(</span><span
class=SpellE>str</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"'>#007<span style='mso-spacerun:yes'> </span><span
style='mso-tab-count:3'> </span><span
class=GramE>alert(</span><span class=SpellE>str</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"'>#008<span style='mso-spacerun:yes'> </span><span
style='mso-tab-count:2'> </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"'>#009<span style='mso-spacerun:yes'> </span><span
style='mso-tab-count:2'> </span><span
class=SpellE>var</span> <span class=SpellE>objectCallBack</span> = function <span
class=SpellE><span class=GramE>getObject</span></span><span class=GramE>(</span><span
class=SpellE>obj</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"'>#010<span style='mso-spacerun:yes'> </span><span
style='mso-tab-count:3'> </span>alert("</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"'>"+<span class=SpellE>obj.index</span>+"\n</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"'>"+<span class=SpellE>obj.chapterName</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"'>#011<span style='mso-spacerun:yes'> </span><span
style='mso-tab-count:2'> </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"'>#012<span style='mso-spacerun:yes'> </span><span
style='mso-tab-count:2'> </span>function
<span class=SpellE><span class=GramE>makeArray</span></span><span class=GramE>(</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"'>#013<span style='mso-spacerun:yes'> </span><span
style='mso-tab-count:3'> </span><span
class=SpellE>var</span> <span class=SpellE>paramArray</span> = new <span
class=GramE>Array(</span>3);<span style='mso-tab-count:2'> </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"'>#014<span style='mso-spacerun:yes'> </span><span
style='mso-tab-count:3'> </span><span
class=SpellE><span class=GramE>paramArray</span></span><span class=GramE>[</span>0]=<span
class=SpellE>document.getElementById</span>("num1").value;<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"'>#015<span style='mso-spacerun:yes'> </span><span
style='mso-tab-count:3'> </span><span
class=SpellE><span class=GramE>paramArray</span></span><span class=GramE>[</span>1]=<span
class=SpellE>document.getElementById</span>("num2").value;<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"'>#016<span style='mso-spacerun:yes'> </span><span
style='mso-tab-count:3'> </span><span
class=SpellE><span class=GramE>paramArray</span></span><span class=GramE>[</span>2]=<span
class=SpellE>document.getElementById</span>("num3").value;<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"'>#017<span style='mso-spacerun:yes'> </span><span
style='mso-tab-count:3'> </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"'>#018<span style='mso-spacerun:yes'> </span><span
style='mso-tab-count:3'> </span><span
class=GramE>return</span> <span class=SpellE>paramArray</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"'>#019<span style='mso-spacerun:yes'> </span><span
style='mso-tab-count:1'> </span><span
style='mso-spacerun:yes'> </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"'>#020<span style='mso-spacerun:yes'> </span><span
style='mso-tab-count:2'> </span>function
<span class=SpellE><span class=GramE>testArray</span></span><span class=GramE>(</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"'>#021<span style='mso-spacerun:yes'> </span><span
style='mso-tab-count:3'> </span><span
class=SpellE>var</span> <span class=SpellE>params</span> = <span class=SpellE><span
class=GramE>makeArray</span></span><span class=GramE>(</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-bidi-font-family:"Times New Roman"'>#022<span
style='mso-spacerun:yes'> </span><span style='mso-tab-count:3'> </span></span><span
class=SpellE><span class=GramE><span lang=EN-US style='font-size:9.0pt;
mso-fareast-font-family:仿宋_GB2312;mso-bidi-font-family:"Times New Roman"'>TestMethod.collectionFromClientAndBack</span></span></span><span
class=GramE><span lang=EN-US style='font-size:9.0pt;mso-fareast-font-family:
仿宋_GB2312;mso-bidi-font-family:"Times New Roman"'>(</span></span><span
class=SpellE><span lang=EN-US style='font-size:9.0pt;mso-fareast-font-family:
仿宋_GB2312;mso-bidi-font-family:"Times New Roman"'>params,showResult</span></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"'>#023<span style='mso-spacerun:yes'> </span><span
style='mso-tab-count:2'> </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"'>#024<span style='mso-spacerun:yes'> </span><span
style='mso-tab-count:2'> </span><span
class=SpellE>var</span> <span class=SpellE>showResult</span> = function <span
class=GramE>show(</span>result){<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"'>#025<span style='mso-spacerun:yes'> </span><span
style='mso-tab-count:3'> </span><span
class=SpellE><span class=GramE>document.getElementById</span></span><span
class=GramE>(</span>"result").value=result;<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'> </span><span
style='mso-tab-count:3'> </span>alert("</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"'>="+result);<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'> </span><span
style='mso-tab-count:2'> </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'> </span><span
style='mso-tab-count:2'> </span></script><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'> </span><span
style='mso-tab-count:1'> </span></head><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;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -