The following code sample will help you to read data from the parent page from the child page.
Assume that you are having two pages in your sample application
let say the first page is "WebForm1.aspx" and the second page is "WebForm2.aspx"
Now in your application you have opened the Second page from the first page using window.open()
and in the situation, you need to access the TextBox value of WebForm1 from Webform2
you can use the below code.
Var FirstPageValue = window.parent.document.getElementById("TextBox1").value;
To read a value from a GrandParent window, you can use;
Var FirstPageValue = window.parent.parent.document.getElementById("TextBox1").value;