Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <style>
- .button {
- display: inline-block;
- padding: 15px 25px;
- font-size: 24px;
- cursor: pointer;
- text-align: center;
- text-decoration: none;
- outline: none;
- color: #fff;
- background-color: #7aa2e2;
- border: none;
- border-radius: 10px;
- box-shadow: 0 9px #777;
- }
- .button:hover {background-color: #5a83c4}
- .button:active {
- background-color: #a5442e;
- box-shadow: 0 5px #555;
- transform: translateY(4px);
- }
- </style>
- </head>
- <body>
- <button class="button" type="button" value=1 onclick="pressed(1)">1</button>
- <button class="button" type="button" value=2 onclick="pressed(2)">2</button>
- <p id="lcd"></p>
- <script>
- var listOper = ["+","-","*","/","C"];
- var prevKey = "";
- var oper = "";
- function pressed(key){
- var lcd = document.getElementById("lcd");
- //lcd.innerHTML = key;
- if (key in listOper){
- oper = key;
- }
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement