Pass JavaScript variable between two HTML pages

后端 未结 3 1299
野性不改
野性不改 2021-01-25 17:22

I have this html page, that gathers the movie name and stores it in a JavaScript variable.




        
3条回答
  •  说谎
    说谎 (楼主)
    2021-01-25 17:54

    This way:

     var movieName = window.location.hash;
    

    and the URL shall look like

    window.open("display.html#42"); // '42' is presumably that movie ID.
    

提交回复
热议问题