MayoorPatel
asked on
Need to Execute this this JS code 1/3 times
I have this code on my page but only want to execute it randomly one in three times
if (document.URL == "http://www.google.com")
{
window.location = "http://www.facebook.com";
}
Is there some code I can put around it to do this. Its javascript
if (document.URL == "http://www.google.com")
{
window.location = "http://www.facebook.com";
}
Is there some code I can put around it to do this. Its javascript
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.