Two forms share same input

后端 未结 2 761
悲&欢浪女
悲&欢浪女 2021-02-07 08:17

How can two forms share the same inputs? I have two forms, one for two different paths... if i wanted to get the user to enter their name, but only once.... how could both forms

2条回答
  •  一整个雨季
    2021-02-07 09:07

    In HTML5 you could do it without JavaScript. Do one form with one set of inputs, and just make two submit buttons using a different formaction attributes found on Mozilla Developer Network like this:

提交回复
热议问题