I have this javascript:
The above counts clicks.
The above displays the click count.
Can anyone show me how to make the page redirect to a specified URL after the 10th click?
Code:
<script type="text/javascript">
var clicks = 0;
function linkClick(){
document.getElementById('clicked').value = ++clicks;
}
document.write('<a href="#" onclick="linkClick()">Click Me!</a>');
</script>
The above counts clicks.
Code:
You have clicked the link <input id="clicked" size="3" onfocus="this.blur();" value="0" > times.
The above displays the click count.
Can anyone show me how to make the page redirect to a specified URL after the 10th click?