a页面$(function(){ name = $("#name").text(); age = $("#age").text(); $("#btn").on("click",function(){jump1(); }); }); function jump1(){ url = "b.html?name="+name+"&age="+age;//此处拼接内容 window.location.href = url; }
tony
23
将要跳转到的b页面:
b页面$(function(){ getData1(); }); function getData1(){ var name = $.query.get("name"); var age = $.query.get("age"); $("#name").text(name); $("#age").text(age); }