Pass JavaScript variable between two HTML pages

后端 未结 3 1329
野性不改
野性不改 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 18:05

    If you do not want to use any server side technology then you can use query string. Add movie name as query string parameter while opening the new page then in new page access URL to fetch this variable.

    
    
    
    
    
    
    

    Second Page:

    
     
    
    

    Note: I have not written getQueryVariable function myself. Credit goes to this link.

提交回复
热议问题