Hallo,
Hier eine Variante von rfbs Script
<html><head><title>Test</title>
<script type="text/javascript">
~~~~~~javascript
window.onload=function(){
with (document) {
plus1=getElementById("plus1");
plus1.textFeld = getElementById("zahl1");
plus1.onclick = addiereEins;
plus2=getElementById("plus2");
plus2.textFeld = getElementById("zahl2");
plus2.onclick = addiereEins;
}
};
addiereEins=function() {
this.textFeld.firstChild.data = parseInt(this.textFeld.firstChild.data)+1;
};
~~~~~~html
</script></head>
<body>
<p><button id="plus1">+1</button> : <span id="zahl1">0</span></p>
<p><button id="plus2">+1</button> : <span id="zahl2">0</span></p>
</body>
</html>
Gruß, der Arbeitslose