Weet iemand waarom er bij onclick helemaal niets gebeurt?
code:
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
| <html>
<head>
<script type="text/javascript">
myImage1 = new Image();
myImage1.src = "buttonpages/artback.jpg";
myImage2 = new Image();
myImage2.src = "buttonpages/stippen.jpg";
function swap()
{
if (document.getElementById('table1').backgroundimage==myImage1)
{
document.getElementById('table1').backgroundimage=myImage2;
}
else
{
document.getElementById('table1').backgroundimage=myImage1;
}
}
</script>
</head>
<body bgcolor="#000000">
<form>
<table ID="table1" border="0" cellpadding="0" cellspacing="0" width="100%" height="80%" style="padding-top: 40px" background="buttonpages/stippen.jpg">
<tr>
<td>
<INPUT TYPE="button" VALUE="Button"
ONCLICK="swap()" style="font-family: Arial">
</td>
</tr>
</table>
</form>
</body>
</html> |