Javascript - Comment programmer un click?

J'ai essayé avant, mais ça ne fonctionne pas. Est-il torts du code?

<script type ="text/javascript">
function count()
{
var x = 0;
x += 1;
document.getElementById( "counting" ).value = x;
}
</script>
</head>
<body>

<input type ="button" value = "Click" onclick = "count()"/><br><br>
<input id = "counting" type = "text" />

</body>

OriginalL'auteur Programme Newbie | 2009-11-23