search

Home  >  Q&A  >  body text

javascript - How to use parameters obtained from one page in another page

<!DOCTYPE html>
<html>
<head>

<script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.js">
</script>

<body>
<ul>

<li>Glen</li>

<li>Tane</li>

<li>John</li>

</ul>

<button>hit</button>
<script>

$("button").click(function(){
   var jet=$("ul li").length;
})

</script>
</body>

How to use the parameters obtained by jet on another page?

女神的闺蜜爱上我女神的闺蜜爱上我2772 days ago864

reply all(2)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-06-12 09:34:16

    1、本地储存:localstorage/sessionstorage
    2、cookie
    3、url传值
    4、如果两个页面是父子关系,父窗口打开子窗口,子窗口可以通过window.opener指向父窗口

    reply
    0
  • 淡淡烟草味

    淡淡烟草味2017-06-12 09:34:16

    1. Use local storage
    2. Use cookies
    3. Save jet as a parameter in the url, and get the jet parameters on another page

    reply
    0
  • Cancelreply