Panel members: Cheng Peng Alain Li
Source:
Ys.jap
Please select your request</p><p>have multiplication<input Type=checkbox name=cc1 value=true>have negative numbers<input Type=checkbox name=fu1 value=true>Multiple number operations<input type=checkbox name=sys1 value= ture > </p><p>Minimum Value:<input name= "min1" type= "text" class= "input" size= "+" style= "ime-mode:disabled"onkeydown= "if (event.keycode==13) event.keycode=9" onkeypress= "if ((Event.keycode <48 | | event.keycode>57)) Event.returnvalue=false">Maximum value:<input name= "Max1" type= "text" class= "input" size= "+" style= "ime-mode:disabled"onkeydown= "if (event.keycode==13) event.keycode=9" onkeypress= "if ((Event.keycode <48 | | event.keycode>57)) Event.returnvalue=false"> </p> <p>Number of questions:<input name= "number" type= "text" class= "input" size= "+" style= "ime-mode:disabled"onkeydown= "if (event.keycode==13) event.keycode=9" onkeypress= "if ((Event.keycode <48 | | event.keycode>57)) Event.returnvalue=false"></p><p> <input type=" Submit "value=" commit "> <input type=" reset "value=" reset "> </p> </center></form></body>02.jsp
<%@ page language= "java" contenttype= "text/html; Charset=iso-8859-1 "pageencoding= "Iso-8859-1"%><! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" "Http://www.w3.org/TR/html4/loose.dtd" >String cc1= Request.getparameter ("cc1"); String Kh1= Request.getparameter ("Kh1"); String FS1= Request.getparameter ("FS1"); String Yv1= Request.getparameter ("Yv1"); String FU1= Request.getparameter ("FU1"); String sys1= Request.getparameter ("Sys1"); String min1= Request.getparameter ("Min1"); String Max1= Request.getparameter ("Max1"); String Number= Request.getparameter ("number"); Out.println (cc1+ kh1+yv1+ fs1+ sys1+ min1+ max1+Number );BooleanCc=false;BooleanKh=false;Booleanfs=false;Booleanyv=false;Booleanfu=false;Booleansys=false;if(cc1== "true") {cc=true;};if(kh1== "true") {kh=true;};if(fs1== "true") {fs=true;};if(sys1== "true") {sys=true;};if(yv1== "true") {yv=true;};if(fu1== "true") {fu=true;};intMin =Integer.parseint (min1);intMax =Integer.parseint (MAX1);intnum =integer.parseint (number);%><script type= "Text/javascript" >functionRannum (max2,min2) {intRan = (int) (Math.random () *max2 +min2)returnran; }functionExchange (num1,num2, select) {intN; if(select==1)//The first big one { if(num1<num2) {N=NUM1; NUM1=num2; Num2=N; } } Else { if(num1>num2) {N=NUM1; NUM1=num2; Num2=N; } } }functionOpe (max2) {Charo; if(Rannum (max2,1) ==1) {o= ' + ';} if(Rannum (max2,1) ==2) {o= '-';} if(Rannum (max2,1) ==3) {o= ' * ';} if(Rannum (max2,1) ==4) {o= '/';} Else{o= '! ';} }functionOperation1 (MAX2)//an operator has no score { varopera[]; intNum1,num2,result=0; Charope1=ope (MAX2); NUM1=Rannum (max,min); Num2=Rannum (max,min); if(ope1== ' + ') {result=num1+num2;} if(ope1== '-') {Exchange (num1,num2,1); result=num1-num2;} if(ope1== ' * ') {result=num1*num2;} opera[0]=NUM1; opera[1]=Ope1; opera[2]=num2; opera[3]=result; if(ope1== '/') {Exchange (num1,num2,2); opera[3]=num1+ '/' +num2;} returnOpera; }functionOpration2 (max2) {varopera[]; intNum1,num2,num3,result; CharOpe1,ope3; Ope1=ope (MAX2); Ope3=ope (MAX2); NUM1=Rannum (max,min); Num2=Rannum (max,min); NUM3=Rannum (max,min); if(ope1== ' + ') {result=num1+num2;} if(ope1== '-') {Exchange (num1,num2,1); result=num1-num2;} if(ope1== ' * ') {result=num1*num2;} if(ope1== '/') {Exchange (num1,num2,2); result=num1/num2;} opera[0]=NUM1; opera[1]=Ope1; opera[2]=num2; opera[3]=result; returnOpera; }</script><script type= "Text/javascript" >varsz=[];vards=[];varinput=[];if(sys==true)//There are multiple-bit operators { if(cc==true)//have multiplication { } Else{}//no multiplication . }Else//thought operator { if(cc==true)//have multiplication { } Else { }//no multiplication . }</script></body>:
Summary: This homework did not do well, not in a specific time to do out, in the future to study hard.
Arithmetic Web Edition