动态Web表单 [英] Dynamic Web Forms
问题描述
我创建了一个包含多个输入字段的表单。在我的
表单的开头,我使用一组单选按钮来确定如何验证表单
以及确定需要哪些字段。因为表格是如此冗长,我希望通过包含关于哪些字段
需要信息的视觉线索来帮助用户,方法是将该字段的背景颜色更改为红色。我
了解如何按字段完成此字段,但是,我正在寻找
更简单的方法。相反,写一个大乱的函数,为每一个字段声明
(document.form.name.style.backgroundColor =''red''),我会
喜欢能够一次将这个命令广播到几个选定的领域。
任何建议都将不胜感激。
最好的问候,
Martin Franklin
-
MA********@cox.net
I''ve created a form with several input fields. At the beginning of my
form I use a set of radio buttons to determine how to validate the form as
well as determine what fields are required. Because the form is so lengthy,
I would like to aid users by including visual clues as to what fields
require information by changing the background color of that field to red. I
understand how to accomplish this field by field however, I am looking for
an easier way. Rather that write a big messy function which declares
(document.form.name.style.backgroundColor=''red'') for every single field, I''d
like to be able to broadcast this command to several chosen fields at once.
Any suggestion would be greatly appreciated.
Best Regards,
Martin Franklin
--
MA********@cox.net
推荐答案
" MA ***** ***@cox.net" < MA ******** @ Cox.net> aécritdansle message de
news:CNFfd.19527
"MA********@cox.net" <MA********@Cox.net> a écrit dans le message de
news:CNFfd.19527
SW3.507@fed1read01
SW3.507@fed1read01
我创建了一个表单有几个输入字段。在我的表单开头,我使用一组单选按钮来确定如何验证
表单以及确定所需的字段。因为表格是如此冗长,我想通过将视野线索包含在哪些字段需要信息来帮助用户,将该字段的背景颜色更改为红色。我知道如何通过
字段来完成这个领域,但是,我正在寻找一种更简单的方法。而是为每个单独的字段编写一个大杂乱的函数来声明
(document.form.name.style.backgroundColor =''red''),我想成为能够一次将此命令广播到几个选定的字段。任何建议都将不胜感激。
I''ve created a form with several input fields. At the beginning of
my form I use a set of radio buttons to determine how to validate the
form as well as determine what fields are required. Because the form
is so lengthy, I would like to aid users by including visual clues as
to what fields require information by changing the background color
of that field to red. I understand how to accomplish this field by
field however, I am looking for an easier way. Rather that write a
big messy function which declares
(document.form.name.style.backgroundColor=''red'') for every single
field, I''d like to be able to broadcast this command to several
chosen fields at once. Any suggestion would be greatly appreciated.
不是很了解,但也许:
<输入类= QUOT;需" ...
Didn''t understand very well, but maybe :
<input class="required" ...
" MA ******** @ cox.net" < MA ******** @ Cox.net>写道:
"MA********@cox.net" <MA********@Cox.net> writes:
我创建了一个包含多个输入字段的表单。在我的
表单的开头,我使用一组单选按钮来确定如何验证表单,以及确定需要哪些字段。因为表格太长,
I''ve created a form with several input fields. At the beginning of my
form I use a set of radio buttons to determine how to validate the form as
well as determine what fields are required. Because the form is so lengthy,
为什么不把表单分成两步呢?在第一步中,他们选择一个
单选按钮并提交表单。根据选择哪个单选按钮
,他们会在第二步中获得不同的表格。
-
Chris
Why not make the form two steps? In the first step, they select a
radio button and submit the form. Depending on which radio button is
selected, they get a different form in the second step.
--
Chris
这篇关于动态Web表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!