JQuery: Access Post Options

Just started with jQuery and I managed to pass the parameter using POST, firebug confirms this:

Parameters
link    test1@test.com
Source
link=test1%40test.com

I don’t know how to access the link parameter from the receiving page using jQuery, it should be so simple, but everything I was looking for (jquery site, SO, etc.) mentions everything except this one.

Thanks Alex

+3
source share
3 answers

Javascript cannot access POST. I'm sorry. You will need to use server technology or use the GET attributes if necessary.

+4
source

, javascript POST. , , script . ,

var postData = <?php echo $_POST['link']; ?>;

, .

+1

You can use only the POST parameters in the request sent from the client (javascript) to the server. This does not make sense in another direction - the server returns a response, not POST parameters. This is the main problem, not javascript itself.

0
source

Source: https://habr.com/ru/post/1738418/


All Articles