t**********o 发帖数: 124 | 1 Hi, ge wei DX
我是JAVASCRIPT 门外汉。I want to create a form with different elements
based on the user's input. But don't know how to do it.
For example:
Given a form which shows only one text field plus a submit button,
after the user enters a number(say, 6), the form then changes to show 6 text
fields, and the original text filed disappeared.
I saw similiar effects before on some website, but forget where they are.
Could anyone here give me some help? Thanx!
tutu | w*****o 发帖数: 92 | | b****u 发帖数: 22 | 3 嘿嘿,看看这个吧
http://developer.apple.com/internet/javascript/choose_form.html
需要用到DHTML,把不同的组件放到不同的层里就行了
源代码和解释在
http://developer.apple.com/internet/javascript/dynamicforms.html
【在 t**********o 的大作中提到】 : Hi, ge wei DX : 我是JAVASCRIPT 门外汉。I want to create a form with different elements : based on the user's input. But don't know how to do it. : For example: : Given a form which shows only one text field plus a submit button, : after the user enters a number(say, 6), the form then changes to show 6 text : fields, and the original text filed disappeared. : I saw similiar effects before on some website, but forget where they are. : Could anyone here give me some help? Thanx! : tutu
| t**********o 发帖数: 124 | 4 嘿嘿,看了, it's really cool! But my situation is that I can not predict how
many fields I need to create.
I have worked out an ugly one, xian jiang ju zhe yong le :)
Thanks again!
tutu
text
【在 b****u 的大作中提到】 : 嘿嘿,看看这个吧 : http://developer.apple.com/internet/javascript/choose_form.html : 需要用到DHTML,把不同的组件放到不同的层里就行了 : 源代码和解释在 : http://developer.apple.com/internet/javascript/dynamicforms.html
| s**********i 发帖数: 711 | 5 it would be much better submit the first value to
the server then server produce the output as next
page.
【在 t**********o 的大作中提到】 : 嘿嘿,看了, it's really cool! But my situation is that I can not predict how : many fields I need to create. : I have worked out an ugly one, xian jiang ju zhe yong le :) : Thanks again! : tutu : : text
| t**********o 发帖数: 124 | 6 Hi, 事事实实
Why have to bother server? Any disadvantages? Thanks!
tutu
在 shishishishi (shishishishi) 的大作中提到: 】
how | s**********i 发帖数: 711 | 7
because this kind of job can be easily done by server
not client.
【在 t**********o 的大作中提到】 : Hi, 事事实实 : Why have to bother server? Any disadvantages? Thanks! : tutu : 在 shishishishi (shishishishi) 的大作中提到: 】 : how
|
|