I have created a page for updation of record. I want to pass the id of student from one page to another. I am trying to send it through window.location but it is not working. In
If both pages are at same domain you can use localStorage
, storage
event to pass data between html
documents
At second page
window.addEventListener("storage", function(e) {
// do stuff at `storage` event
var id = localStorage.getItem("id");
});
at first page
// do stuff, set `localStorage.id`
localStorage.setItem("id", "abc");