Advertisement
Guest User

Untitled

a guest
Jan 19th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. </head>
  6. <body>
  7.  
  8. <form>
  9. <select id = "select1">
  10. <option>0</option>
  11. <option>1</option>
  12. <option>2</option>
  13. <option>3</option>
  14. <option>4</option>
  15. <option>5</option>
  16. <option>6</option>
  17. <option>7</option>
  18. <option>8</option>
  19. <option>9</option>
  20. </select>
  21.  
  22. <select id = "select2">
  23. <option>0</option>
  24. <option>1</option>
  25. <option>2</option>
  26. <option>3</option>
  27. <option>4</option>
  28. <option>5</option>
  29. <option>6</option>
  30. <option>7</option>
  31. <option>8</option>
  32. <option>9</option>
  33. </select>
  34.  
  35. <label id = "label_plus">+</label>
  36. <input id = "plus" type="checkbox" name="plus">
  37. <label id = "label_minus">-</label>
  38. <input id = "minus" type="checkbox" name="minus">
  39. <label id = "label_div">div</label>
  40. <input id = "div" type="checkbox" name="div">
  41. <label id = "label_mod">mod</label>
  42. <input id = "mod" type="checkbox" name="mod">
  43.  
  44. <button id = "buton"> = </button>
  45. </form>
  46.  
  47. <script type="text/javascript">
  48. window.onload = function(){
  49. var s1 = document.getElementById("select1");
  50. var s2 = document.getElementById("select2");
  51. var btn = document.getElementById("buton");
  52. var plus = document.getElementById("plus");
  53. var minus = document.getElementById("minus");
  54. var div = document.getElementById("div");
  55. var mod = document.getElementById("mod");
  56. btn.onclick = function() {
  57. if(plus.checked == true){
  58. var p = document.createElement("p");
  59. p.innerHTML = "1";
  60. document.body.appendChild(p);
  61. }
  62. if(minus.checked == true){
  63. console.log("-");
  64. }
  65. if(div.checked == true){
  66.  
  67. }
  68. if(mod.checked == true){
  69.  
  70. }
  71. }
  72. }
  73. </script>
  74.  
  75. </body>
  76. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement