How to pass variable value between different html pages in javascript

前端 未结 5 2034
滥情空心
滥情空心 2020-11-27 17:45

I want to pass the value of selected list item to the other page,means if I m selecting abc from the list then this abc value passes to the next html form a

5条回答
  •  伪装坚强ぢ
    2020-11-27 18:11

    this will redirect the page to profile.html with params as ?something=textishere

    this will be the url formed : /profile.html?something=textishere&submit=Send"

    then you can get the parameters at this page using

    location.search
    

提交回复
热议问题