繁体   English   中英

您如何使用jquery允许用户选择网站偏好设置,然后重定向到该页面/网站?

[英]How do you use jquery to allow a user to choose site preference and then redirect to that page/site?

我有一个需要多个主页的域,我希望访问者选择其首选项,并使用JQuery在cookie中设置该首选项。 我无权访问该站点上的代码,因此需要使用jQuery或Javascript来完成。 我不是程序员,但是如果有先机,我可以拼凑起来。

更多详细信息:www.domain.com/home www.domain.com/home2 www.domain.com/home3

User makes a choice from the above in a pulldown menu

Cookie is set marking their home page preference

User is redirected to their specific choice

Next time they visit www.domain.com the cookie is read and they are redirected to their preference

If no cookie exists, redirect to root or /home

我不确定如果您“无法访问该站点上的代码”而又“拥有一个域”,那么您将尝试做什么,但是您可能会发现此jQuery cookie库很有用。

至于重定向位,请看这里

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM