View Single Post
Old 02-08-2012, 04:19 AM   PM User | #2
xelawho
Senior Coder

 
xelawho's Avatar
 
Join Date: Nov 2010
Posts: 2,437
Thanks: 52
Thanked 453 Times in 451 Posts
xelawho will become famous soon enoughxelawho will become famous soon enough
you want it to be able to flip back and forth infinitely?
Code:
<html>
<head>
<script type="text/javascript">
var clicked=false;
function duck(){
alert("wabbit season")
clicked=true;
}
function wabbit(){
alert("duck season")
clicked=false;
}
</script>
</head>
<body>
<input type="button" value="click me!" onclick="clicked==false?duck():wabbit()" />
</body>
</html>
xelawho is offline   Reply With Quote
Users who have thanked xelawho for this post:
BirdIsTheWord (02-08-2012)