What is equivalent code for window.location in jQuery?
I am currently using window.location for client-side redirection in jQuery. Is there any equivalent syntax to do client-side redirection开发者_运维技巧?
You still can do that. JQuery is built upon JavaScript and the DOM.
If you're going to use jQuery, you should appreciate that all it is is a library that makes some JavaScript tasks easier. Don't try and use it for every JavaScript task under the sun.
window.location
is provided by the browser's DOM, not jQuery. So if jQuery is not present, it matters not one bit.
window.location is working fine for IE, Firefox and Chrome.
精彩评论