开发者

Multiple Forms vs 1 All-Encompassing Form?

开发者 https://www.devze.com 2022-12-12 18:48 出处:网络
I\'m writing a YouTube Reply/Comment type wall on my website.This allows users to either post a new comment to the开发者_Python百科 wall, or reply to any existing comment on the wall.

I'm writing a YouTube Reply/Comment type wall on my website. This allows users to either post a new comment to the开发者_Python百科 wall, or reply to any existing comment on the wall.

Is it recommended to create a separate form for each reply comment box? Or is it better to just create 1 form on the page that contains all of the input/submit elements, and then just use code to figure out which part of the form the user is submitting?

This question really isn't about this particular application, but just general coding best practices. Thanks!

ps - I will be using jQuery/Ajax


The best thing to do is to use separate forms. Unless you're using ASP.net, in which case you're already inside one giant form.

0

精彩评论

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

关注公众号