mirror of
https://github.com/zyqunix/tools.git
synced 2025-07-06 14:30:31 +02:00
oh dear
This commit is contained in:
parent
220a7626fb
commit
5738f9f43e
3 changed files with 163 additions and 0 deletions
26
calc/calc.js
Normal file
26
calc/calc.js
Normal file
|
@ -0,0 +1,26 @@
|
|||
const num7 = document.getElementById('7');
|
||||
const num8 = document.getElementById('8');
|
||||
const num9 = document.getElementById('9');
|
||||
const divide = document.getElementById('divide');
|
||||
const sqroot = document.getElementById('sqroot');
|
||||
const num4 = document.getElementById('4');
|
||||
const num5 = document.getElementById('5');
|
||||
const num6 = document.getElementById('6');
|
||||
const mutiply = document.getElementById('mutiply');
|
||||
const percent = document.getElementById('percent');
|
||||
const num1 = document.getElementById('1');
|
||||
const num2 = document.getElementById('2');
|
||||
const num3 = document.getElementById('3');
|
||||
const subtract = document.getElementById('subtract');
|
||||
const fraction = document.getElementById('fraction');
|
||||
const num0 = document.getElementById('0');
|
||||
const decimal = document.getElementById('decimal');
|
||||
const negative = document.getElementById('negative');
|
||||
const add = document.getElementById('add');
|
||||
const sum = document.getElementById('sum');
|
||||
|
||||
const result = document.querySelector('span#resultnum');
|
||||
|
||||
num7.addEventListener('click', () => {
|
||||
result.innerHTML = num7.innerHTML;
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue