Advertisement
tr00per92

Calculator-HTML

Jun 6th, 2014
664
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.82 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <link rel="stylesheet" type="text/css" href="styles/07-Calculator.css">
  6.     <script src="script/Calc.js"></script>
  7.     <title>Simple Calculator</title>
  8. </head>
  9. <body>
  10.     <table id="calc">
  11.         <thead>
  12.             <tr>
  13.                 <th colspan="4">
  14.                     <form><input id="display" type="text" placeholder="0" autofocus
  15.                                 onkeypress="searchKeyPress(event)"></form>
  16.                 </th>
  17.             </tr>
  18.         </thead>
  19.         <tbody>
  20.             <tr>
  21.                 <td><button onclick="calculate(1)">1</button></td>
  22.                 <td><button onclick="calculate(2)">2</button></td>
  23.                 <td><button onclick="calculate(3)">3</button></td>
  24.                 <td><button onclick="calculate('+')">+</button></td>
  25.             </tr>
  26.             <tr>
  27.                 <td><button onclick="calculate(4)">4</button></td>
  28.                 <td><button onclick="calculate(5)">5</button></td>
  29.                 <td><button onclick="calculate(6)">6</button></td>
  30.                 <td><button onclick="calculate('-')">-</button></td>
  31.             </tr>
  32.             <tr>
  33.                 <td><button onclick="calculate(7)">7</button></td>
  34.                 <td><button onclick="calculate(8)">8</button></td>
  35.                 <td><button onclick="calculate(9)">9</button></td>
  36.                 <td><button onclick="calculate('*')">*</button></td>
  37.             </tr>
  38.             <tr>
  39.                 <td><button onclick="calculate('clear')">C</button></td>
  40.                 <td><button onclick="calculate(0)">0</button></td>
  41.                 <td><button onclick="calculate('=')">=</button></td>
  42.                 <td><button onclick="calculate('/')">/</button></td>
  43.             </tr>
  44.         </tbody>
  45.     </table>
  46. </body>
  47. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement