Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- </head>
- <body>
- <form>
- <select id = "select1">
- <option>0</option>
- <option>1</option>
- <option>2</option>
- <option>3</option>
- <option>4</option>
- <option>5</option>
- <option>6</option>
- <option>7</option>
- <option>8</option>
- <option>9</option>
- </select>
- <select id = "select2">
- <option>0</option>
- <option>1</option>
- <option>2</option>
- <option>3</option>
- <option>4</option>
- <option>5</option>
- <option>6</option>
- <option>7</option>
- <option>8</option>
- <option>9</option>
- </select>
- <label id = "label_plus">+</label>
- <input id = "plus" type="checkbox" name="plus">
- <label id = "label_minus">-</label>
- <input id = "minus" type="checkbox" name="minus">
- <label id = "label_div">div</label>
- <input id = "div" type="checkbox" name="div">
- <label id = "label_mod">mod</label>
- <input id = "mod" type="checkbox" name="mod">
- <button id = "buton"> = </button>
- </form>
- <script type="text/javascript">
- window.onload = function(){
- var s1 = document.getElementById("select1");
- var s2 = document.getElementById("select2");
- var btn = document.getElementById("buton");
- var plus = document.getElementById("plus");
- var minus = document.getElementById("minus");
- var div = document.getElementById("div");
- var mod = document.getElementById("mod");
- btn.onclick = function() {
- if(plus.checked == true){
- var p = document.createElement("p");
- p.innerHTML = "1";
- document.body.appendChild(p);
- }
- if(minus.checked == true){
- console.log("-");
- }
- if(div.checked == true){
- }
- if(mod.checked == true){
- }
- }
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement