开发者

Is it a bad practice to have nested forms? [duplicate]

开发者 https://www.devze.com 2023-03-04 04:50 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicate: Can you nest html forms?
This question already has answers here: Closed 11 years ago.

Possible Duplicate:

Can you nest html forms?

开发者_运维百科

Is it a bad practice to have something like this?:

<form method="post">

<form method="post">
</form>

</form>


Yes. Very much so. And it won't work properly. I would restructure the page to make sure it doesn't have it nested..


It is completely invalid markup - it will break in various painful, interesting and different ways in various browsers. Is it bad practice to write invalid HTML? (hint: yes, it's a Bad Idea) Even if you don't give a rat's ass about valid HTML, is it bad practice to write HTML which is almost certain to give your users incorrect behavior? (hint: yes, it's a Bad Idea, unless you passionately hate your users)


I'm pretty sure that will never work as expected properly. 100% bad practice as far as I know / am concerned.

0

精彩评论

暂无评论...
验证码 换一张
取 消