Reputation: 17052
How can we access the variable which is submitted such as
<form methord='get' action='sdsd.html'>
using javascript?
Upvotes: 8
Views: 17639
Reputation: 5907
POST values are not accessible client side.
GET values can be accessed via
window.location.search
Upvotes: 7
Reputation: 26922
Values that have been "posted" with GET are now in the querystring. You could parse the querystring with JS to get the values.
Here is a general example: Parse Querystring with JS
Upvotes: 6