[Javascript]隐藏的字段 [英] [Javascript] Hidden fields

查看:103
本文介绍了[Javascript]隐藏的字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

[Javascript] Hidden field


你好我的朋友们。


这是一个htm页面,其中包含一个在窗口popUp中打开的表单(页面女儿)。


此表单在一个名为tec的隐藏字段中插入一个值,在页面母版中以其他形式打开。


如您所见,select包含多个属性。


问题在于,在名为tec的隐藏字段中,从select tec form page daughter中选择更多名称。表单页面母亲我只有名字,例如:


我在名为tec的隐藏字段中选择值 gabriele和giuseppe 表单页面的女儿;表格页面的母亲我只有 gabriele


为什么?

你能帮助我吗?



[Javascript] Hidden field

Hello my friends.

This is a htm page that contains a form open in window popUp ( page daughter ).

This form insert a value in the one hidden field called "tec", in other form open in the page mother.

As you can see the select contains multiple attribute.

The problem is that by selecting more names from select tec form page daughter, in the hidden field called "tec" form page mother I have only the first name, for example:

I select value gabriele and giuseppe form page daughter, in the hidden field called "tec" form page mother I have only gabriele.

Why?
Can you help me ???



展开 | 选择 | Wrap | < span class =codeLinkonclick =LineNumbers(this);>行号

推荐答案

对于多选元素,需要循环选项并检查选择了哪些。
For a multiple select element, you need to loop over the options and check which ones are selected.



对于多选元素,您需要循环选项并检查哪些是选择。
For a multiple select element, you need to loop over the options and check which ones are selected.



你好,感谢x你的回复。


我写这个是为了你的建议:

展开 | 选择 | Wrap | 行号


你所做的一切都是构造一个字符串,而不是将它设置为任何东西。
All you''ve done is constructed a string without setting it to anything.


这篇关于[Javascript]隐藏的字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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