如何将表单值从一个页面传递到另一个页面? [英] How can I pass form values from one page onto another?

查看:760
本文介绍了如何将表单值从一个页面传递到另一个页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要将URL和域类型从一个HTML页面传递到另一个,显然最好的方法是使用java脚本创建一个cookie,并将值传递到下一个HTML页面,但我不知道任何关于饼干或甚至从哪里开始。在哪里可以找到一个好的指南,让我开始使用cookies和/或如何将价值从一种形式传递到另一种?有没有更简单的方法,而不是使用Cookie?谢谢!

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 cookies and/or how to pass the value from one form to another? Is there a simpler way instead of using cookies? Thanks!

推荐答案

有多种方法可以做到这一点:$ b​​ $ b - POST变量。
- 将值保存在会话中(取决于语言可以更多或更少)。
- 或者保存到cookie。

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.

我认为最简单的方法是使用POST变量(和GET一样简单,避免在网址本身传递网址)。

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).

这篇关于如何将表单值从一个页面传递到另一个页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆