Kod:
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
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>http://www.bilisimogretmeni.com/</title>
<script type="text/javascript">
function toplam() {
var deger1 = parseInt(********.getElementById('sayi1').value);
var deger2 = parseInt(********.getElementById('sayi2').value);
********.getElementById('sonuc').value = deger1 + deger2;
}
function cikartma() {
var deger1 = parseInt(********.getElementById('sayi1').value);
var deger2 = parseInt(********.getElementById('sayi2').value);
********.getElementById('sonuc').value = deger1 - deger2;
}
function carpma() {
var deger1 = parseInt(********.getElementById('sayi1').value);
var deger2 = parseInt(********.getElementById('sayi2').value);
********.getElementById('sonuc').value = deger1 * deger2;
}
function bolme() {
var deger1 = parseInt(********.getElementById('sayi1').value);
var deger2 = parseInt(********.getElementById('sayi2').value);
********.getElementById('sonuc').value = deger1 / deger2;
}
</script>
</head>
<body>
<input type="text" id="sayi1" /> <input type="text" id="sayi2" />
<br />
<input type="button" value="+" id="topla" onclick="toplam()" />
<input type="button" value="-" id="fark" onclick="cikartma()" />
<input type="button" value="*" id="carp" onclick="carpma()" />
<input type="button" value="/" id="bol" onclick="bolme()" /><br />
Sonuç<br /><input type="text" id="sonuc" />
</body>
</html>