Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

jquery redirect to another webpage

$(location).attr('href', 'https://google.com');
Comment

How can I redirect the user from one page to another using jQuery or pure JavaScript?

Solution #1
for Jquery you can use following code
$(location).prop('href', 'https://www.codegrepper.com/profile/shafeeque-ahmad')

Solution #2
for pure javascript you can use following solution

window.location.href='otherpage.com';
 window.location.assign('otherpage.com');
 //and...

 window.location.replace('otherpage.com');
Comment

jquery window redirect with header

$(location).attr('href', 'www.google.co.in');
Comment

PREVIOUS NEXT
Code Example
Javascript :: shopify comment code 
Javascript :: toggle text jquery 
Javascript :: js random hex color 
Javascript :: jquery ajax cors 
Javascript :: p5.js cdn 
Javascript :: react native build aab 
Javascript :: ts-node command not found 
Javascript :: javascript void(0) href 
Javascript :: jquery get screen height 
Javascript :: jquery refresh page 
Javascript :: media query js 
Javascript :: react native text underline 
Javascript :: jquery prevent form submit 
Javascript :: python json save to file 
Javascript :: allow paste js code 
Javascript :: replace multiple spaces with single space javascript 
Javascript :: js loop array backwards 
Javascript :: javascript replace line breaks with br 
Javascript :: how to wait 1 second in javascript 
Javascript :: react native cover image 
Javascript :: change background image with jquery 
Javascript :: js replace space with dash 
Javascript :: update version of node gyp 
Javascript :: express req ip address 
Javascript :: node-fetch post request example 
Javascript :: remove header from certain pages react navigation 
Javascript :: set value in span using javascript 
Javascript :: javascript appendchild image node 
Javascript :: remove extra space in string js 
Javascript :: Could not resolve dependency: peer react@"^18.2.0" from react-dom@18.2.0 
ADD CONTENT
Topic
Content
Source link
Name
1+3 =