[英]Redirect from specific url to specific url in javascript
I want to preferably in Javascript a user to be redirected in this case from https://app.salonized.com/c/5304/dashboard (the page after logining in) to this page https://app.salonized.com/franchise/reports/overview .我最好在Javascript中使用Z5E056C56C500A1C4B6A7110B50D807BADE5Z://APP.SALONIED.COMP5/1.com/5304/daphboard (page in page in page in page in page in page in page in page in of z5e056c500a1c4b6a7110b50d807bade5z:特许经营/报告/概述。 So a specific url to another url.
所以一个特定的 url 到另一个 url。 I tried some redirects but I lack the knowledge to get this done properly.
我尝试了一些重定向,但我缺乏正确完成此操作的知识。
I tried this method but I think im doing it wrong:我尝试了这种方法,但我认为我做错了:
if window.location. = "https://app.salonized.com/mobile" else window.location.href = "https://app.salonized.com/franchise/reports/overview"
Just need some proper synax.只需要一些适当的语法。
'=' for setting and use '===' for comparing '=' 用于设置和使用 '===' 进行比较
if(window.location.href === "https://app.salonized.com/mobile"){
window.location.href = "https://app.salonized.com/franchise/reports/overview";
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.