Is it valid to have a html form inside another html form?

前端 未结 14 1805
故里飘歌
故里飘歌 2020-11-22 06:01

Is it valid html to have the following:

14条回答
  •  -上瘾入骨i
    2020-11-22 06:43

    HTML 4.x & HTML5 disallow nested forms, but HTML5 will allow a workaround with "form" attribute ("form owner").

    As for HTML 4.x you can:

    1. Use an extra form(s) with only hidden fields & JavaScript to set its input's and submit the form.
    2. Use CSS to line up several HTML form to look like a single entity - but I think that's too hard.

提交回复
热议问题