You can use the .counter property of JavaScript function to achieve this:
Now you have a static variable as: staticVariable.counter
function staticVariable(change)
{
if (change == "next") {
staticVariable.counter++;
}
else if(change=="prev")
{
staticVariable.counter++;
}
No comments:
Post a Comment