码迷,mamicode.com
首页 > Web开发 > 详细

两个html之间进行传值,如何进行?

时间:2018-09-29 20:22:14      阅读:149      评论:0      收藏:0      [点我收藏+]

标签:点击   document   获取   https   details   跳转   输入   esc   inpu   

function turnto(){
var getval=document.getElementById("text").value;
turngetval=escape(getval);
document.location.href="search.html?a="+turngetval;
}

上面这段代码的意思是从本html中获取input中输入的内容,然后变url的值,实现跳转到第二个页面

 

--------------------- 本文来自 less_cold 的CSDN 博客 ,全文地址请点击:https://blog.csdn.net/less_cold/article/details/52710343?utm_source=copy 

两个html之间进行传值,如何进行?

标签:点击   document   获取   https   details   跳转   输入   esc   inpu   

原文地址:https://www.cnblogs.com/shiwanming/p/9726279.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!