Hello all! My name's Peter Richards, based in
Canada. I joined this forum a few minutes ago.
I'm hoping to find a little helpful direction
with a 15 line index.html file I'm trying out
(as a beginner level person learning html).
What I'm trying to do is get my script to load
google.com page then close tab after 8 seconds.
Frustratingly, my script was doing the 8000 ms
delay 1st and loading of google.com page 2nd.
If anyone has a useful suggestion, thank you.
<!DOCTYPE html>
<html>
<head>
<title>Script title</title>
</head>
<body>
<script>
function redirectFunc() {
window.open("https://www.google.com");
}
setTimeout("redirectFunc()", 8000);
//window.close();
</script>
</body>
</html>
Canada. I joined this forum a few minutes ago.
I'm hoping to find a little helpful direction
with a 15 line index.html file I'm trying out
(as a beginner level person learning html).
What I'm trying to do is get my script to load
google.com page then close tab after 8 seconds.
Frustratingly, my script was doing the 8000 ms
delay 1st and loading of google.com page 2nd.
If anyone has a useful suggestion, thank you.
<!DOCTYPE html>
<html>
<head>
<title>Script title</title>
</head>
<body>
<script>
function redirectFunc() {
window.open("https://www.google.com");
}
setTimeout("redirectFunc()", 8000);
//window.close();
</script>
</body>
</html>