开发者

How can I pass form values from one page onto another?

开发者 https://www.devze.com 2023-01-28 19:21 出处:网络
I need to pass a URL and domain type from one HTML page to another and apparently the best way to do this is using java-script to create a cookie and pass the value to the next HTML page, but I do not

I need to pass a URL and domain type from one HTML page to another and apparently the best way to do this is using java-script to create a cookie and pass the value to the next HTML page, but I do not know anything about cookies or even where to start. Where can I find a good guide to get me started with coo开发者_运维知识库kies and/or how to pass the value from one form to another? Is there a simpler way instead of using cookies? Thanks!


There is more than one way to do this: - You can pass the values using GET or POST variables. - Save the value in the session (depending on the language this can be more or less easier). - Or save it to a cookie.

I think the easiest way to do it is to use POST variables (is as easy as with GET but you should avoid passing an URL in the url itself).

0

精彩评论

暂无评论...
验证码 换一张
取 消