According to my experience I said more and no one to see, but still simple introduction of the effect bar, you can choose +,-, *,/, to calculate data, like the words paste copy yourself to see it!
<!DOCTYPE HTML Public "-//W3C//DTD XHTML 1.0 transitional//en" "http://www.w3.org/TR/xhtml1/DTD/ Xhtml1-transitional.dtd "><HTMLxmlns= "http://www.w3.org/1999/xhtml"><Head><Metahttp-equiv= "Content-type"content= "text/html; charset=gb2312" /><title>Untitled Document</title></Head><Body><inputtype= ' text 'ID= ' Txt1 'value="" /> <SelectID= ' SELECT '> <optionvalue= ' 0 '>+</option> <optionvalue= "1">-</option> <optionvalue= "2">*</option> <optionvalue= "3">/</option> </Select> <inputtype= ' text 'ID= ' txt2 '/> <inputtype= ' button 'value= ' = 'onclick= "count ()" /> <!--Use the = button to invoke the created function to get the result - <inputtype= ' text 'ID= ' Fruit '/> </Body><Scripttype= "Text/javascript"> functioncount () {vara=parseint (document.getElementById ("txt1"). Value)//gets the value of the first input box varb=parseint (document.getElementById ("txt2"). Value)//gets the value of the second input box varC=parseint (document.getElementById ("Select"). Value)varD=document.getElementById ("Fruit"). ValueSwitch(c) { Case 0: document.getElementById ("Fruit"). Value=Add (A, b); Break; Case 1:d Ocument.getelementbyid ("Fruit"). Value=sum (A, b); Break; Case 2:d Ocument.getelementbyid ("Fruit"). Value=app (A, b); Break; Case 3:d Ocument.getelementbyid ("Fruit"). Value=DIVs (A, b); Break; }//gets the value selected by the drop-down box to change the subtraction algorithm //set the value of the result input box } functionAdd (A, b) {suma=a+b; returnSuma; } functionsum (A, b) {Sumb=a-b; returnSumb; } functionapp (A, b) {SUMC=a*b; returnSUMC; } functionDIVs (A, b) {SUMD=a/b; returnSUMD; } </Script> </HTML>
A native JS-written subtraction operation