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

前端 未结 4 1459

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:43

    Action normally specifies the file/page that the form is submitted to (using the method described in the method paramater (post, get etc.))

    An action of # indicates that the form stays on the same page, simply suffixing the url with a #. Similar use occurs in anchors. Link for example, will stay on the same page.

    Thus, the form is submitted to the same page, which then processes the data etc.

提交回复
热议问题