-
Notifications
You must be signed in to change notification settings - Fork 0
/
hypotheek.php
95 lines (93 loc) · 2.88 KB
/
hypotheek.php
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Funda</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="stylesheet" href="style.css" type="text/css"/>
</head>
<script>
var kk;
var ks;
var totall;
var bdp;
var iz;
var ip;
var bez;
var lenen;
document.onclick = function () {
kk = document.getElementById('kk');
ks = document.getElementById('ks');
bdp = document.getElementById('bdp');
totall =document.getElementById('totall');
iz =document.getElementById('iz');
ip =document.getElementById('ip');
bez =document.getElementById('bez');
lenen = document.getElementById('lenen')
ks.onkeyup = function up() {
kk.value = parseInt(parseInt(ks.value) * 0.02);
calctotall();
}
bdp.onkeyup = function test(){calctotall()};
kk.onkeyup = function test(){calctotall()};
iz.onkeyup = function test(){calctotall()};
ip.onkeyup = function test(){calctotall()};
bez.onkeyup = function test(){calctotall()};
};
function calctotall() {
if(bdp.value=="") {
bdp.value = "0";
}
if(iz.value=="") {
iz.value = "0";
}
if(ip.value=="") {
ip.value = "0";
}
if(bez.value=="") {
bez.value = "0";
}
totall.value = parseInt(bdp.value)+parseInt(ks.value)+parseInt(kk.value);
lenen.innerHTML = (parseInt(iz.value)+parseInt(ip.value))*1.5+parseInt(bez.value);
}
</script>
<body>
<div id="main">
<div id="details">
<table id="kenmerken">
<tr>
<th colspan="2">Stap 1. Wat kost je droomhuis?</th>
<th colspan="2">Stap 2. Wat kan ik lenen?</th>
</tr>
<tr>
<td>Koopsom huis</td>
<td>€<input type="text" name="koopsom" id='ks'></td>
<td>Bruto jaarinkomen</td>
<td>€<input type="text" name="jaarinkomen" id="iz"></td>
</tr>
<tr>
<td>Inschatting Kosten koper</td>
<td>€<input type="text" name="kk" id="kk"></td>
<td>Bruto jaarinkomen parttner</td>
<td>€<input type="text" name="jaarinkomenPartner" id="ip"></td>
</tr>
<tr>
<td>Bouwdepot</td>
<td>€<input type="text" name="bouwdepot" id="bdp"></td>
<td>eigen geld</td>
<td>€<input type="text" name="cash" id="bez"></td>
</tr>
<tr>
<td colspan="4">
<hr/>
</td>
</tr>
<tr>
<td>TOTAAL</td>
<td>€<input type="text" name="toaal" id="totall"></td>
<td colspan="2" id="lenen"></td>
</tr>
</table>
</div>
</div>
</body>
</html>