skal det bare tælles op fra 0 for hver gang siden bliver hentet?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>EXP 912902</title>
<script type="text/javascript">
var counts = new Array();
function count(objButton){
if(counts[objButton.name]==undefined){
counts[objButton.name]=1;
}else{
counts[objButton.name]++;
}
alert("Der er blevet trykket på "+objButton.name+" "+counts[objButton.name]+" gang(e)");
}
</script>
</head>
<body>
<button onclick="count(this)" name="btn1">Knap 1</button><br>
<button onclick="count(this)" name="btn2">Knap 2</button><br>
<button onclick="count(this)" name="btn3">Knap 3</button><br>
<button onclick="count(this)" name="btn4">Knap 4</button>
</body>
</html>
http://majbom.com/testarea/exp/912902/