w*s 发帖数: 7227 | 1 【 以下文字转载自 BuildingWeb 讨论区 】
发信人: wds (净洗前尘,从头再来), 信区: BuildingWeb
标 题: Q: 2 submit buttons in 1 page
发信站: BBS 未名空间站 (Wed Jul 18 22:19:14 2012, 美东)
say i have
1. a textbox, 1 submit button.
2. in the text box default is "box 1", i type "hello"
3. press submit, same page will display "you typed hello"
this is simple.
now in the same page, i want to dup this text box and submit button.
so 2 text boxes, 2 submit buttons.
the problem is,
when i type sth. in box 1,
then type anything in box 2.
when i press the 2nd submit button,
the text in box 1 goes to the default value.
i'm using perl + cgi.pm.
in general, can this be done ? no need to be perl.
thx ! | g*****g 发帖数: 34805 | 2 Some simple js should do, just pass a different parameter.
【在 w*s 的大作中提到】 : 【 以下文字转载自 BuildingWeb 讨论区 】 : 发信人: wds (净洗前尘,从头再来), 信区: BuildingWeb : 标 题: Q: 2 submit buttons in 1 page : 发信站: BBS 未名空间站 (Wed Jul 18 22:19:14 2012, 美东) : say i have : 1. a textbox, 1 submit button. : 2. in the text box default is "box 1", i type "hello" : 3. press submit, same page will display "you typed hello" : this is simple. : now in the same page, i want to dup this text box and submit button.
| d****n 发帖数: 1637 | |
|