📘 Premium Read: Access my best content on Medium member-only articles — deep dives into Java, Spring Boot, Microservices, backend architecture, interview preparation, career advice, and industry-standard best practices.
🎓 Top 15 Udemy Courses (80-90% Discount): My Udemy Courses - Ramesh Fadatare — All my Udemy courses are real-time and project oriented courses.
▶️ Subscribe to My YouTube Channel (176K+ subscribers): Java Guides on YouTube
▶️ For AI, ChatGPT, Web, Tech, and Generative AI, subscribe to another channel: Ramesh Fadatare on YouTube
Example:
// Simulate a mouse click:
window.location.href = "https://www.javaguides.net/";
// Simulate an HTTP redirect:
window.location.replace("https://www.javaguides.net/");
How to Redirect to Another Web Page Using jQuery
$(location).attr('href','https://www.javaguides.net');
<html>
<head>
<title>how to redirect to another web page using jQuery</title>
</head>
<body>
<h2>how to redirect to another web page using jQuery</h2>
<script
src="https://code.jquery.com/jquery-3.4.1.min.js"
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
crossorigin="anonymous"></script>
<script>
$(document).ready(function() {
$(location).attr('href','https://www.javaguides.net');
});
</script>
</body>
</html>
Comments
Post a Comment
Leave Comment