标签:session gate ora 传值 http html test open htm
/** * 页面跳转与传值 * http://www.cnblogs.com/cyy-13/p/5775344.html * http://www.jb51.net/article/25403.htm */ function testPageJump(){ debugger; // cookie传值 document.cookie = "AAA=aaa&BBB=bbb"; // localStorage传值 localStorage.CCC = "ccc"; localStorage.setItem("AAA","aaa"); // sessionStorage传值 sessionStorage.setItem("BBB","bbb"); // 参数传值 // 在当前页面打开 window.location.href = "PageB.html?AAA=aaa&BBB=bbb"; // 在当前页面打开 self.location = "PageB.html"; // 在当前页面打开 top.location = "PageB.html"; // 打开新页面 window.open("PageB.html?AAA=aaa&BBB=bbb"); // ie? window.navigate("PageB.html"); window.navigate("http://www.baidu.com"); // 返回 window.history.back(-1); } /** * B页面 */ console.log(window.location.href); console.log(document.cookie); console.log(localStorage.CCC); console.log(localStorage.getItem("AAA")); console.log(sessionStorage.getItem("BBB"));
参考:
标签:session gate ora 传值 http html test open htm
原文地址:http://www.cnblogs.com/zhen-android/p/7653582.html