两种形式 [英] Two forms
问题描述
我在一个页面上有两个表单。在表格A中,我有下拉列表(单个
选择)。当我单击表单B中的提交按钮时,我想获取表单A下拉列表中显示的值
。可以这样做吗?
将两个表单分开的原因是表单A打开一个新的浏览器
窗口,并选择该表单,而表单B将它保存在同一个
浏览器中它的选择窗口。但是,下拉列表值是
两者都使用,我不想在表格B中重复该列表。
Shelly
I have two forms on one page. In Form A I have drop-down list (single
selection). When I click a submit button in form B, I would like to pick up
the value showing in the drop down list of Form A. Can this be done?
The reason for separating the two forms is that Form A opens a new browser
window with selection in that form, whereas Form B keeps it in the same
browser window for its selections. The drop-down list value, however, is
used in both and I would not want to repeat that list in Form B.
Shelly
推荐答案
Shelly写道:
Shelly wrote:
我有两个表格一页。在表格A中,我有下拉列表(单个
选择)。当我单击表单B中的提交按钮时,我想获取表单A下拉列表中显示的值
。可以这样做吗?
将两个表单分开的原因是表单A打开一个新的浏览器
窗口,并选择该表单,而表单B将它保存在同一个
浏览器中它的选择窗口。但是,下拉列表值是两个中使用的
,我不想在表单B中重复该列表。
Shelly
I have two forms on one page. In Form A I have drop-down list (single
selection). When I click a submit button in form B, I would like to pick up
the value showing in the drop down list of Form A. Can this be done?
The reason for separating the two forms is that Form A opens a new browser
window with selection in that form, whereas Form B keeps it in the same
browser window for its selections. The drop-down list value, however, is
used in both and I would not want to repeat that list in Form B.
Shelly
你可以通过JavaScript或AJAX来实现,你能为我们提供
代码,所以我可以向你解释一下吗?
-------------------------------------------- ------------------------------------------
有关php / ajax / javascript教程和提示,请访问我的博客
http://www.nurazije.co.nr
You can do it by JavaScript or by AJAX, can you provide us with the
code, so I can explain to you eaisier ??
--------------------------------------------------------------------------------------
For php/ajax/javascript tutorials and tips, visit me on my blog at
http://www.nurazije.co.nr
" NurAzije" < nu ****** @ gmail.com写信息
新闻:11 ********************** @ m73g2000cwd .googlegr oups.com ...
"NurAzije" <nu******@gmail.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
>
Shelly写道:
>
Shelly wrote:
>我在一个页面上有两个表单。在表格A中,我有下拉列表(单个选项)。当我单击表单B中的提交按钮时,我想选择
显示表单A下拉列表中显示的值。可以这样做吗?
分离这两个表单的原因是表单A打开一个新的
浏览器窗口,其中包含该表单中的选择,而表单B将其保存在相同的浏览器窗口中以供选择。但是,下拉列表值在两者中都使用了,我不想在表单B中重复该列表。
Shelly
>I have two forms on one page. In Form A I have drop-down list (single
selection). When I click a submit button in form B, I would like to pick
up
the value showing in the drop down list of Form A. Can this be done?
The reason for separating the two forms is that Form A opens a new
browser
window with selection in that form, whereas Form B keeps it in the same
browser window for its selections. The drop-down list value, however, is
used in both and I would not want to repeat that list in Form B.
Shelly
你可以通过JavaScript或AJAX来实现,你能为我们提供
代码,所以我可以向你解释一下吗?
You can do it by JavaScript or by AJAX, can you provide us with the
code, so I can explain to you eaisier ??
我不知道AJAX。
[php code]
< ?php
if(isset(
I don''t know AJAX.
[ php code]
<?php
if (isset(
_POST [''A''])){
_POST[''A''])) {
这篇关于两种形式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!