File: basicalc.js

package info (click to toggle)
wims 2%3A4.29a%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 185,704 kB
  • sloc: xml: 366,687; javascript: 120,570; ansic: 62,341; java: 62,170; sh: 7,744; perl: 3,937; yacc: 3,217; cpp: 1,915; lex: 1,805; makefile: 1,084; lisp: 914; pascal: 601; python: 520; php: 318; asm: 7
file content (47 lines) | stat: -rw-r--r-- 1,931 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47

<center>
<form name="Calc">

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<table border="4">
<tr>
<td>
<input type="text" name="Input" size="16"/>
<br/>
</td>
</tr>
<tr>
<td>
<input type="button" name="one"   value="  1  " onclick="Calc.Input.value += '1'"/>
<input type="button" name="two"   value="  2  " OnCLick="Calc.Input.value += '2'"/>
<input type="button" name="three" value="  3  " onclick="Calc.Input.value += '3'"/>
<input type="button" name="plus"  value="  +  " onclick="Calc.Input.value += ' + '"/>
<br/>
<input type="button" name="four"  value="  4  " onclick="Calc.Input.value += '4'"/>
<input type="button" name="five"  value="  5  " OnCLick="Calc.Input.value += '5'"/>
<input type="button" name="six"   value="  6  " onclick="Calc.Input.value += '6'"/>
<input type="button" name="minus" value="  -  " onclick="Calc.Input.value += ' - '"/>
<br/>
<input type="button" name="seven" value="  7  " onclick="Calc.Input.value += '7'"/>
<input type="button" name="eight" value="  8  " OnCLick="Calc.Input.value += '8'"/>
<input type="button" name="nine"  value="  9  " onclick="Calc.Input.value += '9'"/>
<input type="button" name="times" value="  x  " onclick="Calc.Input.value += ' * '"/>
<br/>
<input type="button" name="clear" value="  c  " onclick="Calc.Input.value = ''"/>
<input type="button" name="zero"  value="  0  " onclick="Calc.Input.value += '0'"/>
<input type="button" name="DoIt"  value="  =  " onclick="Calc.Input.value = eval(Math.round(eval(Calc.Input.value)*(Math.pow(10,12)))/(Math.pow(10,12)))"/>
<input type="button" name="div"   value="  &#247;  " onclick="Calc.Input.value += ' / '"/>
<br/>
</td>
</tr>
</table>
</form>
</center>

<!-- <p><center>
<font face="arial, helvetica" size="-2">Free JavaScripts provided<br/>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p> -->