i want to configure two different actions on a button depending on the click. For the first time click , i want to call a function F1() and on all other time i want call another function F2().
I am new to javascript, and i am looking for a variable that can store the value like a flag. I tried it but the values are not persisting.
<script>
var fflag=1;
if(fflag!=2){
F1();//do an action
fflag = 2;
}
else{
F2();//do another action
}
</script>