<form action = ". /"> where will you go?

Asked

Viewed 754 times

2

I am passing an ASP page to PHP and found a form where the action attribute had the following value: <form action="./">. This action value works as a <form action="#">? That is, directs to the same page?

  • ./ means current directory.

  • http://www.dicas-l.com.br/arquivo/camio_absoluto_e_camio_relativo.php#. Wysmt3xytpg

3 answers

5


Negative, when it sends to "./" will fall to the root of the current folder. Then in this case, who enters the scene and receives the form parameters will be the index of this folder.

Unless, of course, the form page in question is already the index, then it goes back to it.

2

An action containing "#" is referencing an anchor present on the page itself. As in:

<a href="#titulo">Link na pagina</a>
...
<a name="titulo"></a>

When using an unnamed anchor as in "#" most browsers by default go back to the top of the page.

When you use href the "/" value is pointing to the index page (index.html, index.php, index.aspx, or as configured on the server) of the site root.

When you use a href ". /" you are pointing to the index of the current directory.

When you use href "? anything", you are referencing the current page, updating it with some parameter via GET.

1

Without stalling, it means going to the current directory. That is, if the page directory x.asp for c:\pages\files\x.asp, will go to c:\pages\files

Browser other questions tagged

You are not signed in. Login or sign up in order to post.