We first look at the

after the operation of the

"//files.jb51.net/file_images/article/201802/201822411024001.jpg" alt= ">

" then we share all the code:

 < DOCTYPE html> <!; html> < head> < meta charset= "UTF-8" > < title> document< /title> < style type= "text/css" > / *.Jisuanqi calculator style*/ {width: 270px; height: 200px border:; 1px solid black; list-style-type: none; background: #C9E495; margin: 10px 0px 10px 0px.Jisuanqi span;} {width: 20px; height: 10px; margin-right: 5px;}.Jisuanqi {margin-bottom:} input {width: 5px; [name=yunsuanfu] 50px; height: 30px margin-lef; T: 10px;} / * a yuan quadratic function root style*/.Box {width: 300px; height: 200px border:; 1px solid black; text-align: center; background: #C9E495;}.Box {margin-bottom:} input 10px; < /style> < script type= "text/javascript" > / / 10-100 and function (Sum Computing) {var i=0 for (VaR; j=10; j< =100; j++) {i+=j}; document.getElementById.Value=i ("count");} / / function (Runnian) to determine whether a leap year {var year = document.getElementById ("year").Value; if ("year==") {alert ("please enter the year");} else if (year< =0) {alert ("please input more than 0 year" (if);} else (year% 4 = = 0) (& & Year% 100! = 0 year ||% 400 = = 0) {document.write (year+) "is a" + "n"); document.write (< a href=''> < /a> input return; "else{document.write (year+)}" is not a leap year "+" n "); document.write (" < a; href=''> /a> < input return;}} ") 1 function (Calculate) / / calculator {var sum=0; VAR num1 = parseFloat (document.getElementById (" text1 ").Value); VAR num2 = parseFloat (document.getElementById (" text2 ").Value); VAR sel = document.getElementById (" select ").Value; switch (SEL) {Case +: sum=num1+num2; break; case: sum=num1-num2; break; -" case "*": sum=num1*num2; break; case: sum=num1/num2; break "/"; "Please enter the default:sum= number selection operator; break;} document.getElementById (Jieguo).Value = sum;} / / function 2 calculator Cal (count) {var sum; VAR num1 = parseFloat (document.getElementById (" Text3 ").Value); VAR num2 = parseFloat (document.getElementById (" Text4 "); switch.Value) (count) {Case +: sum=num1+num2; break; case: sum=num1-num2; break; -" case "*": sum=num1*num2; break; case / break; document.getElementById: sum=num1/num2;} (result) =.Value (sum.toFixed (2));} / / calculation of one yuan quadratic function function Hanshu (a=parseFloat) {var (document.getElementById ("txta"); VAR b=parseF.Value) Loat (document.getElementById ("txtb"); VAR c=parseFloat (.Value) document.getElementById ("txtc").Value var var (r1=); d=b*b-4*a*c -b+Math.sqrt (d)) / (2*a); VAR r2= (-b-Math.sqrt (d)) / (2*a); document.getElementById ("txt1").Value= (r1.toFixed (2)) document.getElementById ("txt2");.Value= (r2.toFixed (2)}); < /script> < /head> < body> <! -- first questions 10 to 100 and the calculation of --> < input type= "button" value= "onClick=" Sum calculation "(>)"; < input type= "text" id= "count" value= "and click the calculation of 10-100" > <! -- second questions to determine whether it is a leap year --> < p> < /p> < div> < to judge whether it is a leap year: /div> < input type= "search" id= "year" maxlength= "4" > < input  type="button" value="计算" onClick="Runnian()">   <!--第三题计算器-->   <p></p>   <input type="text" id="text1" size="5">   <select id="select">      <option value="">选择运算符</option>      <option value="+">+</option>      <option value="-">-</option>      <option value="*">*</option>      <option value="/">/</option>     </select>   <input type="text" id="text2" size="5">   <input type="button" value=" = " onClick = "Calculate()">   <input type="text" id="jieguo">   <!--计算器-->   <div>      <h2>购物简易计算器</h2>      <li><span>第一个数</span>     & lt;input type="search" id="text3">    </li>      <li><span>第二个数</span>     <input type="search" id="text4">    </li>      <li>     <input type="button" value=" + " name="yunsuanfu" onClick="Cal('+')">     <input type="button" value=" - " name="yunsuanfu" onClick="Cal('-')">     <input type="button" value=" × " name="yunsuanfu" onClick="Cal('*')">     <input type="button" value=" ÷ " name="yunsuanfu" onClick="Cal('/')">    </li>      <li><span>计算结果</span>     <input type="search" id="result">    </li>     </div>   <div>      <h3>分别输入abc求根</h3>      <input type="text" size="3" value = "id=" txta "> < input; type=" text "size=" 3 "value=" id= "txtb" > < input; type= "text" size= "3" value= "id=" txtc "> < br /> < input; type=" button "value=" program "onClick=" (Hanshu) "> br /> < < input; type=" text "size=" 7 "id=" txt1 "> < input; type=" text "size=" 7 "id=" txt2 "> < /div> < /body> < /html> 

the

JS code and style you can be used when the flexible transformation, thank you for your support of the script.