Here, we will see how to redirect webpage using JavaScript. Check the below codes that we used to redirect the webpage after 3s using setTimeout fucnction.
Example:
<!DOCTYPE html>
<html>
<body>
<script>
setTimeout(function(){
window.location.href = 'https://codeamend.com/blog/category/javascript/';
}, 3000);
</script>
<p>Web page redirects after 3 seconds.</p>
</body>
</html>
Total Views: 1,183