清华大学出版社郭克华JavaWeb程序设计上机习题答案Word文档格式.docx
- 文档编号:7727082
- 上传时间:2023-05-09
- 格式:DOCX
- 页数:56
- 大小:29.67KB
清华大学出版社郭克华JavaWeb程序设计上机习题答案Word文档格式.docx
《清华大学出版社郭克华JavaWeb程序设计上机习题答案Word文档格式.docx》由会员分享,可在线阅读,更多相关《清华大学出版社郭克华JavaWeb程序设计上机习题答案Word文档格式.docx(56页珍藏版)》请在冰点文库上搜索。
/body>
Main、
(SectionC)
Regiterx
NewMember<
ID&
inputtype=HtextHxbr>
Password&
nbspcinpu(type=npassworduxbr>
Re-Password&
inputtypc=HpasswordHxbi>
FirstName&
inputtype=utextn>
br>
LastName&
nbspcinputtype=MtextH>
Addrcss&
Citv&
inputtype=,,text,'
xbr>
State&
nbsp
select>
optionselected>
[SelectState]<
/option>
/selectxbr>
Countr}r&
EmailAddress&
SelectInterest
inputtype=HcheckboxH>
Technology
Enterprise
inputtype=McheckboxH>
Research
inputtype=HcheckboxM>
Government
People
inputtype=,'
checkboxM>
LifeStyle
Opinion<
Question&
[SelectQuestion]<
Answer&
inputtype=Htextareanxbi>
nbsp&
nbsp<
inputtype=HsubmitHvalue=HSubmitInformationH>
inputtype=HresetHvalue=nResetForm、
/bod>
>
Top、
ahref="
,target=,,main'
>
Login<
/axbi>
ahref=H,,target=HmainM>
Register<
/a>
Treemenux
target=,,main"
作者的个人简介、
vbody>
作者1
局局局
Chapter3
1、
scripttype=,,text/javascriptH>
functionfun(){
b=a/50;
c=a%50/20;
d=a%50%20/10;
e=a%50%20%10/5;
f=a%50%20%10%5;
}
/scripl>
formname=MformM>
您输入的金额为:
inputname=Mtextr'
type=MtextM>
nbsp&
nbsp&
nbsp<
inputtype=ubuttonHonclick=Mfun()Hvalue=H确定°
找零的数量为:
bi>
nbsp50元vinputname=Htext2Htype=MtextH>
张vbr>
nbsp20元vinpulname=Mtext3Htype=,,textM>
张vbr>
nbsplO元vinputname=Htext4Htype=MtextH>
nbsp5元vinpulname=ntext5Htype=HtextH>
nbspl元vinputnamc=Htext6Mtype=HtextH>
2、
scripttype=ntext/javascriptH>
functionadd(){
formname=nformM>
bookl:
nbspvinputnan^^textr*type=HtextHxbr>
book2:
nbspvinputname=Htext2Htype=HtextHxbr>
book3:
nbspvinputname=Htext3°
type=HtextHxbr>
book4:
nbspvinputname=Htext4utype=HtextHxbr>
book5:
inputname=Htext5Htype=HtextHxbr>
inputtype=Mbutton"
onclick=Hadd()Nvalue=H求和,rxbr>
总价:
inputname=Htext6Htype=MtextHxbr>
2S(循环)、
htnil>
varn=newArrayO;
for(i=l;
i<
6;
i++){
(MbookM+i+,,&
inputnanic=texttype=text>
n);
for(i=0;
5;
n[i]=Number(Mtextn)[i].value);
/script>
inputtype=Hbutton,'
onclick=Madd()Mvalue=H求和"
inputname=HtextHtype=MtextHxbr>
3、
=100;
("
欢迎&
nbsp"
);
4、
scripttype=,,text/javascript,,>
varmax=0;
varmin=O;
=10;
if(n[i]>
max){
max=n[i];
min=n[l]:
for(j=l;
j<
j++){
if(n[j]<
min){
max=n|j];
formname=HformM>
book&
nbspl:
inputname=Htextr*type=HtextMxbr>
nbsp2:
inputname=Htext2Mtype=HtextMxbr>
book&
nbsp3:
i叩utname=Htext3Htype=,,text"
nbsp4:
inputname=Htext4Mtype=MtextMxbr>
nbsp5:
inputname=Htext5Htype=MtextMxbr>
nbsp6:
inputname=Htext6Htype=MtextM>
nbsp7:
i叩utname=ntext7Htype=MtextMxbr>
nbsp8:
inputname=Htext8Htype=HtextHxbr>
nbsp9:
i叩utname=Htext9utype=MtextMxbr>
book10&
nbsp:
inputname=*'
text10Mtype=HtextHxbr>
&
inputtype=MbuttonHonclick^funO11value=H确定uxbr>
最高价格:
inputname=utextl1”type=Htext,,xbr>
最低价格:
inputname=utextl2Mtype=Htext°
平均价格:
inputname=Mtextl3Htype=Htext°
<
/html>
4S(循环)、
scripttype=Htext/iavascriptM>
varmin=0;
varave=0;
varmax=0;
ll;
inputnanic=texttype=textxbr>
M);
10;
n[i]=Number(,,text,,)[i].value);
min=n[0]:
for(j=0;
min=n[j];
for(k=0;
k<
k++){
sum+=n[k];
inputtype=MbuttonHonclick=Madd()Hvalue=H确
定Mxbr>
inputname=°
textr,type=ntextMxbr>
最低价格:
vinputname=ntext2Htype=ntextMxbr>
平均价格:
inputname=,ttext3Mtype=ntextuxbr>
Chapter4
4-ls
(1)<
%@pagelanguage=MjavaHimport=M.*HpageEncoding=Hgb2312H%>
scripttype=Htext/javascriptH>
for(vari=l;
i++)
(”欢迎(JSXbi>
”);
%
for(inti=l;
=100:
(”欢迎(JSP)<
“);
%>
(2)<
%@pagelanguage=MjavaHcontentType=,,text/litml;
charset=gb2312nerrorPage=HM%>
for(inti=0;
100:
欢迎<
"
(3)<
%@pagelanguage=MjavaHimport=n.*HpageEncoding=Hgb2312U%>
100;
i++){(”欢迎<
H);
4-2
%@pagelanguage=HjavaHcontentType=Htext/html;
charset=gb2312"
errorPage=,H'
formname="
formH>
inputname=Mmoneyntype=,'
textuxbr>
inputtype=,,submitHvalue=H找零Mxbr>
%!
int(]monRcturn=newint[5];
int[]monElements=newint[]{50,20,10,5,1};
voidmoneyDeal(intmon){
iv5;
monReturn[il=(int)(mon/monElcments[i]);
mon=mon%monElements[i];
%Strings=(umoneyn);
if(s!
=null){
intmon=(s);
moneyDeal(mon);
for(inti=0:
应找零为:
%=monElements[i]%>
元<
%=monReturn[i]%>
张<
匕1>
%@pagelanguage=HjavaHcontentType=Htext/litmI;
charset=gb2312HerrorPage=H,,%>
Stringstr;
int[]monReturn=newint[5];
for(inti=0:
monReturn[i]=(int)(mon/monElements[i]);
functiongetMoney(){
str=inputMon;
formname=HformMaction=Mmoney=M+<
%=str%»
inputname='
moncyHtype=Htextn>
inputtype=,,button°
onclick=getMoney()value—'
找零°
%Strings=(nmoneyn);
1)1>
%@pagelanguage=HjavaHcontentType=Htext/litinl;
charset=gb2312HerrorPage=,,M%>
int[]monRcturn=newint[5];
int|]monElements=newint[]{50,20.10,5」
monReturn[i]=(int)(mo»
/monElements[i]);
=Hmoney=,r+inputMon;
inputname=Mmoneyntype=Htextuxbr>
inputtype="
buttonMonclick=getMoney()value=n找零Hxbr>
%Strings=(umoneyH);
%=monRetum[i]%>
(4)<
%@pagelanguage=MjavaHcontentType=Htext/html;
errorPage=,,M%>
int[]monRetum=newint[5];
int[]monElements=newint[]{50.2030,5」
inputtype=,,button,tonclick=getMoney()value—'
找零Mxbr>
%Strings=(HmoneyH);
intnion=(s);
4・3、
%©
pagelanguage=MjavaMcontentType=Htext/html;
charset=gb2312MerrorPage=,H,%>
upageEncoding=Hgb231T%>
登录:
formname=HloginFormMmethod=HpostH>
账号:
inputname=,,account,ttype=HtextHxbr>
密码:
inputnanie=HpasswordMtype=Hpasswordnxbr>
inputtype=MbuttonHvalue=H登陆”onClick=uvalidate()M>
functionvalidate(){
alert("
登陆成功!
);
return;
elsealert(燈陆失败!
”);
0;
5-2x
pagelanguage=HjavaHimport—'
•朴pageEncoding=Hgb23\T%>
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 清华大学出版社 郭克华 JavaWeb 程序设计 上机 习题 答案