Created
March 12, 2018 06:39
-
-
Save Ajaxsoap/62a737288e342fd83310904f49446181 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h3> | |
Redirecting to google.com.com after <span id="countdown">20</span> seconds | |
</h3> | |
<script type="text/javascript"> | |
var seconds = 20; | |
function countdown() { | |
seconds = seconds - 1; | |
if (seconds < 0) { | |
window.location = "https://google.com"; | |
} else { | |
document.getElementById("countdown").innerHTML = seconds; | |
window.setTimeout("countdown()", 2000); | |
} | |
} | |
countdown(); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment