Submit HTML form on self page

后端 未结 5 1168
迷失自我
迷失自我 2020-12-13 02:08

I want an HTML form to submit to itself. How do I use the action attribute?

5条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-13 02:15

    In 2013, with all the HTML5 stuff, you can just omit the 'action' attribute to self-submit a form

    
    

    Actually, the Form Submission subsection of the current HTML5 draft does not allow action="" (empty attribute). It is against the specification.

    From this other Stack Overflow answer.

提交回复
热议问题