js跳转页面并且进行传递参数
2016-10-30 11:46
633 查看
1:方法一:用地址栏传递参数
第一个页面:
第二个页面:
第一个页面:
<html> <head> <title> New Document </title> <script> function to (){ var getval =document.getElementById("cc").value; document.location.href("b.html?cc="+getval); } </script> </head> <body> <input type="text" id ="cc" > <input type="button" value="a" onclick="to()" > </body> </html>
第二个页面:
<html> <head> <title> New Document </title> <script> var thisURL = document.URL; var getval =thisURL.split('?')[1]; var showval= getval.split("=")[1]; function showvalf(){ alert(showval); document.getElementById('ee').value=showval; } </script> </head> <body onload="showvalf()"> <input type="text" id ="ee" /> </body> </html>
相关文章推荐
- window.location.href 跳转页面时传递参数并且在新页面接收参数
- js用POST方式页面跳转,避免在地址栏中显示传递参数
- js实现两个页面之间跳转参数传递
- 在Js页面通过POST传递参数跳转到新页面详解
- PHP跳转到另一个画面,并且带着该行内的一个数值作为参数传递给下一个页面.能给例子吗
- 在一个页面文件中(JSP 或者HTML)使用href 跳转另一个页面时使用Js中获取传递过来的参数
- js实现两个页面之间跳转参数传递
- JavaScript跳转页面/Action并传递中文参数[解决js超链接传递过程中产生的中文乱码问题]
- js 获取url中的参数进行跨页面传递
- jquerymobile页面跳转和参数传递
- 静态页跨页面传递js参数
- js页面间参数传递
- Silverlight之页面跳转及参数传递(9)
- js通过获取地址栏参数跳转页面
- js页面跳转和js对iframe进行页面跳转、刷新
- asp.net mvc 2.0页面带参数跳转以及获取传递的参数
- HTML链接上把当前的URL做为参数传递时,注意要对URL进行encode,在JS中我们这样实现
- Android页面跳转是如何传递参数的
- HyperLink跳转页面传递绑定参数
- 在进行页面跳转时将多个值传递到下个页面