1. 程式人生 > >兩個html之間進行傳值,如何進行?

兩個html之間進行傳值,如何進行?

element input () cat .html article 代碼 進行 tails

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之間進行傳值,如何進行?