Categories
5G Network
Agile
Amazon EC2
Android
Angular
Ansible
Arduino
Artificial Intelligence
Augmented Reality
AWS
Azure
Big Data
Blockchain
BootStrap
Cache Teachniques
Cassandra
Commercial Insurance
C#
C++
Cloud
CD
CI
Cyber Security
Data Handling
Data using R
Data Science
DBMS
Design-Pattern
DevOps
ECMAScript
Fortify
Ethical Hacking
Framework
GIT
GIT Slack
Gradle
Hadoop
HBase
HDFS
Hibernate
Hive
HTML
Image Processing
IOT
JavaScript
Java
Jenkins
Jira
JUnit
Kibana
Linux
Machine Learning
MangoDB
MVC
NGINX
Onsen UI
Oracle
PHP
Python
QTP
R Language
Regression Analysis
React JS
Robotic
Salesforce
SAP
Selenium
Service Discovery
Service Now
SOAP UI
Spark SQL
Testing
TOGAF
Research Method
Virtual Reality
Vue.js
Home
Recent Q&A
Feedback
Ask a Question
How to redirect a page to another page in Javascript?
Home
>
JavaScript
>
How to redirect a page to another page in Javascript?
asked
Jul 16, 2019
in
JavaScript
by
Indian
Q:
How to redirect a page to another page in Javascript?
#java-script
Answer
1
Answer
0
votes
answered
Jul 16, 2019
by
Indian
Using location.href:
It is the first approach to redirect page. In this, we can go back to access the original document.
Syntax
:window.location.href =“
https://www.madanswer.com/
”
Using location.replace:
Another approach to redirect page. In this, it is not possible to navigate back to the original document by clicking on the back button as it removes the URL of the original document.
Syntax:
window.location.replace("
https://www.madanswer.com/;
");
Click here to read more about JavaScript
Click here to read more about Insurance
Many hands make light work, Share it here
Facebook
Twitter
LinkedIn
Reddit
Related questions
0
votes
Q: How can you redirect to another page in Vue.js?
asked
Jan 9, 2020
in
Vue.JS
by
GeorgeBell
#vue
#vue-installation
#vuejs
+1
vote
Q: How to add/remove properties to object dynamically in Javascript?
asked
Jul 16, 2019
in
JavaScript
by
Indian
#java-script
+1
vote
Q: How to add one new element at end of an array in javascript?
asked
Jul 16, 2019
in
JavaScript
by
Indian
#java-script
0
votes
Q: Redirect to another page in Vue.js
asked
Oct 7, 2019
in
Vue.JS
by
Tate
#vue
#vuejs
#single-file-component
#vue-installation
#declarative-rendering
#conditionals-and-loops
+1
vote
Q: What is difference between Array.splice() and Array.slice() method in JavaScript?
asked
Jul 16, 2019
in
JavaScript
by
Indian
#java-script
+1
vote
Q: List some Design patterns in JavaScript?
asked
Jul 16, 2019
in
JavaScript
by
Indian
#java-script
+1
vote
Q: What is let and const in javascript?
asked
Jul 16, 2019
in
JavaScript
by
Indian
#java-script
0
votes
Q: How To Embed Javascript In A Web Page?
asked
Dec 3, 2019
in
JavaScript
by
rajeshsharma
#embed-javascript
+1
vote
Q: How can you move element in lowercase to uppercase from an array?
asked
Jul 16, 2019
in
JavaScript
by
Indian
#java-script
+1
vote
Q: How to create an array in js and how to read array elements?
asked
Jul 16, 2019
in
JavaScript
by
Indian
#java-script
+1
vote
Q: How Do You Refer To The Main Browser Window That Opened It?
asked
Dec 4, 2019
in
JavaScript
by
SakshiSharma
#java-script
+1
vote
Q: How to define an anonymous function?
asked
Jul 16, 2019
in
JavaScript
by
Indian
#java-script
0
votes
Q: How can we create an object in JS?
asked
Jul 16, 2019
in
JavaScript
by
Indian
#java-script
+1
vote
Q: What is closure and how do you use it?
asked
Jul 16, 2019
in
JavaScript
by
Indian
#java-script
+1
vote
Q: Which built-in method calls a function for each element in the array?
asked
Jul 16, 2019
in
JavaScript
by
Indian
#java-script
+1
vote
Q: Which built-in method reverses the order of the elements of an array?
asked
Jul 16, 2019
in
JavaScript
by
Indian
#java-script
+1
vote
Q: Which built-in method sorts the elements of an array?
asked
Jul 16, 2019
in
JavaScript
by
Indian
#java-script
+1
vote
Q: What is MUL functions?
asked
Jul 16, 2019
in
JavaScript
by
Indian
#java-script
+1
vote
Q: What is SetTimeout()?
asked
Jul 16, 2019
in
JavaScript
by
Indian
#java-script
+1
vote
Q: What is prototypal Inheritance?
asked
Jul 16, 2019
in
JavaScript
by
Indian
#java-script
+1
vote
Q: Difference between “undefine” and “NULL” Keywords?
asked
Jul 16, 2019
in
JavaScript
by
Indian
#java-script
+1
vote
Q: Difference between “==” and “===” ?
asked
Jul 16, 2019
in
JavaScript
by
Indian
#java-script
+1
vote
Q: Difference between “var” and “let” Keywords?
asked
Jul 16, 2019
in
JavaScript
by
Indian
#java-script
+2
votes
Q: I want to re-reach and use an object once it has been garbage collected. Define How it’s possible in Java?
asked
May 31, 2020
in
JAVA
by
SakshiSharma
#java-research
#java-garbage-collect
#java-define
#java-script
#java-games
#games-java
0
votes
Q: What are constants and how to create constants in java?
asked
Jun 16, 2019
in
JAVA
by
reins.robin
#java
#java-script
#java-interview
#java-question
#java-interview-question
+1
vote
Q: How will you navigate from one page to another?
asked
Aug 20, 2020
in
C Sharp
by
RShastri
#xamarin
0
votes
Q: How to call one constructor from the other constructor ?
asked
Jun 16, 2019
in
JAVA
by
reins.robin
#java
#java-script
#java-interview
#java-question
#java-interview-question
0
votes
Q: How to call javascript using in VisualForce page in Salesforce?
asked
Sep 26, 2019
in
Salesforce
by
Robin
salesforce-visualforce
salesforce-javascript
0
votes
Q: What is a named function in JavaScript? How to define a named function?
asked
Oct 19, 2019
in
JavaScript
by
SakshiSharma
javascript-function
function-of-javascript
0
votes
Q: Difference between ‘IS-A’ and ‘HAS-A’ relationship in java?
asked
Jun 17, 2019
in
JAVA
by
reins.robin
#java
#java-script
#java-interview
#java-question
#java-interview-question
...