2 回答
![?](http://img1.sycdn.imooc.com/54584f240001db0a02200220-100-100.jpg)
TA贡献1801条经验 获得超16个赞
纯粹的客户端方法是使用localStorage,它将变量存储在客户端浏览器中。您可以使用:
var university = "some value here";
//creates a variable in the browser called university, which is now accessible from all pages of your website.
localStorage.setItem("university", university);
现在,在你的第二页:
var uni= localStorage.getItem("university"); //gets the value of "university" from localStorage
![?](http://img1.sycdn.imooc.com/54586431000103bb02200220-100-100.jpg)
TA贡献1808条经验 获得超4个赞
<table id="myTable">
<tr class="header">
<th style="width:60%;">State</th>
<th style="width:40%;">University</th>
</tr>
<tr ng-repeat="value in myDynamicData track by $index">
<td>{{value.state}}</td>
<td><a href="universities.html?vu={{value.university}}">{{value.university}}</a></td>
</tr>
</table>
然后在 university.html 中,您可以使用 window.location.search 阅读
添加回答
举报