简体   繁体   中英

form action, blank or period?

I wonder the difference between:

<form method="post" action="">

and

<form method="post" action=".">

I have read this interesting thread . It looks like blank action is handled by all browsers. Some say the period is not a good idea but they don't say why. Furthermore, this thread is quite old now so i think it would be useful to have an update on the subject.

Thanks.

The blank represents that the result display of the form will display within the same page. Let say if you input the name, address, tel # etc.... and press the submit button. The collected information will display within the same page (probably below the form). I usually do this when i design a form to make sure it works. But there are various reason why they leave it blank instead putting another target page.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM