[英]How do I include an element in a form but separate it physically in the layout
So given a layout like so:所以给定这样的布局:
How can I include the value of ComboBox in the submission of the form.如何在提交表单中包含 ComboBox 的值。
Things that have occurred to me:发生在我身上的事情:
I believe I have stated all the restrictions so given that is there another approach?我相信我已经说明了所有限制,因此还有另一种方法吗? If not how should I choose between the above options?如果不是,我应该如何在上述选项之间进行选择?
With out seeing some HTML its hard to determine the layout you have.没有看到一些 HTML 很难确定你的布局。 But my first thought would be to use Absolute positioning with CSS.但我的第一个想法是使用 CSS 的绝对定位。
The other option would be to incorporate the entire page as a part of the form, but this may not be possible due to other functionality on the page that may be necessary另一种选择是将整个页面合并为表单的一部分,但这可能是不可能的,因为页面上可能需要其他功能
You obviously could use aa giant form tag.你显然可以使用一个巨大的表单标签。
OR或者
Two forms, changing the combo and submitting does a full post and adds a hidden to the main form.两个 forms,更改组合并提交完整的帖子并在主窗体中添加一个隐藏。 Then sexy it up with JavaScript (prevent the full post back, and remove the submit button on the combo form)然后用 JavaScript 性感起来(防止完整的回帖,并删除组合表单上的提交按钮)
OR或者
CSS Positioning as you suggest. CSS 按照您的建议定位。
I would say use javascript.我会说使用 javascript。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.