Reputation: 420
I have 2 pages say index.html and 2ndPage.html. index.html has two textboxes and a button. Now i want to enter some data in the textboxes and received the data in 2ndpage.html. I want to use only javascript. dont want to use query string. Only post or get method. Is it possible? Please help me or guide me how to send and receive data form one page to another in javascript/jquery.
Upvotes: 0
Views: 1001
Reputation: 2241
using localStorage or sessionStorage you can do this. here is a link, which will help you. i just take few css property from one page to another page. but you can take input value also. Taking css property from one html page to another page
or if you are taking care of old browser also then javascript Location object is the way to go.
Upvotes: 1
Reputation: 5692
Well, using javascript or jquery you can accomplish that. Check jQuery's AJAX function. Otherwise, learn PHP as already mentioned in the comments.
Upvotes: 2