设置计算器外框架在设置计算器数值输入键位还有四则运算等键位

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>计算器制作</title>
  6. <link rel="stylesheet" type="text/css" href="jisuanqi1.css">
  7. </head>
  8. <body onload="init(),init_dodoke()">
  9. <div id="div1">
  10. <div class="jojo">
  11. <div id="div2">
  12. <form>
  13. <input type="text" name="num" id="num">
  14. </form>
  15. </div>
  16. <div id="div3">
  17. <form>
  18. <input type="button" value="C" id="" />
  19. <input type="button" value="←" id="" />
  20. <input type="button" value="+/-" id="" />
  21. <input type="button" value="/" id="" />
  22. <input type="button" value="7" id="" />
  23. <input type="button" value="8" id="" />
  24. <input type="button" value="9" id="" />
  25. <input type="button" value="*" id="" />
  26. <input type="button" value="4" id="" />
  27. <input type="button" value="5" id="" />
  28. <input type="button" value="6" id="" />
  29. <input type="button" value="-" id="" />
  30. <input type="button" value="1" id="n1" />
  31. <input type="button" value="2" id="" />
  32. <input type="button" value="3" id="" />
  33. <input type="button" value="+" id="" />
  34. <input type="button" value="0" id="" />
  35. <input type="button" value="." id="" />
  36. <input type="button" value="=" id="" />
  37. <input type="button" value="D" id="dodoke" />
  38. </form>
  39. </div>
  40. </div>
  41. </div>
  42. </body>
  43. <script type="text/javascript" src="jisuanqi1.js"></script>
  44. </html>
  45. <!-- 小数点减号存在bug -->