• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

button counter

Fear_It

Active Member
Hi,

I'm looking for a button counter that once the button is pressed the count goes up by 1.

I have this what I came up with

Code:
<!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></title>
<script type="text/javascript">
var count = 0;
function countClicks() {
 count = count + 1;
    document.getElementById("p2").innerHTML = count;
}
</script>
</head>
<p style="text-align: center"><img onclick="javascript:countClicks();" src="button.png" alt="alt text" /></p>
<body>
<p style="text-align: center; font-size: 72px" id="p2">0</p>
</body>
</html>
It's simple but I want it to do is save the count plus the button to be on a seprate page to the count it self if possible?

Thanks
 
Back
Top