Advertisement
Guest User

Untitled

a guest
Oct 19th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.93 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <style>
  5. .button {
  6.   display: inline-block;
  7.   padding: 15px 25px;
  8.   font-size: 24px;
  9.   cursor: pointer;
  10.   text-align: center;
  11.   text-decoration: none;
  12.   outline: none;
  13.   color: #fff;
  14.   background-color: #7aa2e2;
  15.   border: none;
  16.   border-radius: 10px;
  17.   box-shadow: 0 9px #777;
  18. }
  19.  
  20. .button:hover {background-color: #5a83c4}
  21.  
  22. .button:active {
  23.   background-color: #a5442e;
  24.   box-shadow: 0 5px #555;
  25.   transform: translateY(4px);
  26. }
  27. </style>
  28. </head>
  29. <body>
  30. <button class="button" type="button" value=1 onclick="pressed(1)">1</button>
  31. <button class="button" type="button" value=2 onclick="pressed(2)">2</button>
  32.  <p id="lcd"></p>
  33.  <script>
  34.  var listOper = ["+","-","*","/","C"];
  35.  var prevKey = "";
  36.  var oper = "";
  37.  function pressed(key){
  38.     var lcd = document.getElementById("lcd");
  39.     //lcd.innerHTML = key;
  40.     if (key in listOper){
  41.         oper = key;
  42.     }
  43.     }
  44.  </script>
  45. </body>
  46. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement