How to get the previous page value using js?

I need to get the value of my previous page in my redirected page. For example: I have the page A and the page B.

The page B has 3 fieldsets, but by default, it shows only 2.
But, I have a link to page B in my page A, and if I click on this link my page A will be redirected to page B and show the third fieldset.

I tried using History and referrer. But I didn’t get any result.

My progress so far:

$(document).ready(function () {
            var ex=document.referrer;
            alert(ex);
        });

(just to test if it’s working.)

Can anyone help me with this issue?


Source: html5

Leave a Reply