Is it a good practice to use an empty URL for a HTML form's action attribute? (action=“”)

后端 未结 11 2308
花落未央
花落未央 2020-11-22 01:50

I am wondering if anyone can give a \"best practices\" response to using blank HTML form actions to post back to the current page.

There is a post asking what a blan

11条回答
  •  旧时难觅i
    2020-11-22 02:12

    I used to do this a lot when I worked with Classic ASP. Usually I used it when server-side validation was needed of some sort for the input (before the days of AJAX). The main draw back I see is that it doesn't separate programming logic from the presentation, at the file level.

提交回复
热议问题