I have to implement following in java script/HTML
-
first page(1.html) there will be button. When the user press ok button it should open second page(2.html).
-
In page 2 (2.html) there will be one text box and button . when the user enter some value in text box and press ok button the value should be availble in the one page 1.html.
How to do it in java script/Html
There are 2 cross browser ways to do this, setting a param in the url or using a cookie. Both can be done with javascript. However, not knowing the length of the data ( and personal preference against insanely long urls ) I would recommend using a cookie.
The easiest way I have found it interact with cookies via javascript is with the jQuery cookie plugin. https://github.com/carhartl/jquery-cookie