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

前端 未结 4 1442

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

    The # tag lets you send your data to the same file. I see it as a three step process:

    1. Query a DB to populate a from
    2. Allow the user to change data in the form
    3. Resubmit the data to the DB via the php script

    With the method='#' you can do all of this in the same file.

    After the submit query is executed the page will reload with the updated data from the DB.

提交回复
热议问题