what do <form action=“#”> and <form method=“post” action=“#”> do?

前端 未结 4 1444

I\'m reading a book on html development (which I\'m fairly new at) and despite the fact that the book just had its 1st publishing one month ago (Nov. 2011), the author is an

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-27 12:26

    Apparently, action was required prior to HTML5 (and # was just a stand in), but you no longer have to use it.

    See The Action Attribute:

    When specified with no attributes, as below, the data is sent to the same page that the form is present on:

提交回复
热议问题