帮助传递表单值 [英] Help with passing form values

查看:63
本文介绍了帮助传递表单值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将3位信息发送到另一页但我不知道该怎么做。


首页:
http://edgwarelocalcars.co.uk/quote3999.html


在第一页中,用户在两个不同的表格文本框中键入邮政编码,并且在提交时,价格显示在下面,并且路线被绘制在左边的谷地图上以及隐藏计算价格按钮。并显示确认&本书"按钮。点击按钮后,它会带我到booking2.html,最后会有一些参数。示例如下所示

http://edgwarelocalcars.co.uk/Bookin...ults2=results2


一个问题是results2 = results2,(我假设)应该有一个价格显示在页面quote3999.html,< p id =" results2">显示价格,我被建议创建一个具有相同ID的隐藏输入,以便它将名称/值与地址一起传递。

Im trying to send 3 bits of information to another page but I dont know how to do it.

First page:
http://edgwarelocalcars.co.uk/quote3999.html

In the first page, the user types in postcodes in two different form text boxes and upon submission the price is displayed below along with the route being plotted on a google map to the left as well as hiding the "calcualate price button" and showing the "confirm & book" button. Once the button is clicked it takes me to booking2.html with some paramaters at the end. An example is shown below

http://edgwarelocalcars.co.uk/Bookin...ults2=results2

One problem is that results2=results2, (im assuming) there should be a price shown there as in the page quote3999.html, <p id="results2"> shows the price and I was advised to create a hidden input with the same id so that it would pass the name/value along with the addresses.

展开 | 选择 | 换行 | 行号

推荐答案

我在Booking2.html中看到你有一个名为getParams的函数。我没有看到它被召唤过。而且我没有看到它填充任何东西。它只解析URL而不做任何其他事情。


您的问题是如何使用此功能?
I see in Booking2.html you have a function called getParams. I don''t see it ever being called though. And I don''t see it populating anything. It just parses the URL and does nothing else.

Is your question how to use this function?


是的我需要有关该功能的帮助。我试过谷歌并尝试了一些代码,但我永远无法弄清楚该怎么做。如果你能帮助我,我将非常感激
Yes I need help with the function. Ive tried google and tried some codes but I can never figure out what to do. If you can help me I would be very grateful


这里有一些代码供你玩。它将取代booking2中的代码。我稍后会看看quote3999。完成了一些工作。


location.href将返回完整的查询字符串。

Here is some code for you to play with. It would replace the code in booking2. I''ll look at the quote3999 a little later. Got get some work done.

location.href would return your full query string.

展开 | 选择 < span class =codeDivider> | Wrap | 行号


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

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