Solution to the problem of transferring values ​​between html pages

高洛峰
Release: 2017-03-06 15:19:45
Original
1374 people have browsed it

html pages can pass values ​​to each other. Have you ever heard of it? There is a good example below. You can refer to it. The first time I used Essay, I still felt quite awkward.
a.html

The code is as follows:

<html> 
<head> 
<title> demo </title> 
<meta name="Author" content="xugang" /> 
</head> 
<body> 
<FORM name="frm" METHOD="get" ACTION="b.html" onsubmit="return foo()"> 
<INPUT TYPE="hidden" id="hid" value="123" name="hid"> 
<INPUT TYPE="submit" value="提交"> 
</FORM> 
</body> 
</html>
Copy after login


b.html

The code is as follows: :

<HTML> 
<HEAD> 
<TITLE> New Document </TITLE> 
</HEAD> 
<BODY> 
<SCRIPT LANGUAGE="JavaScript"> 
document.write(location+"
"); 
document.write(location.search+"
"); 
document.write(decodeURIComponent(location.search.substr(location.search.indexOf("=")+1))); 
</SCRIPT> 
</BODY> 
</HTML>
Copy after login

For more related articles on solutions to the problem of transferring values ​​between html pages, please pay attention to the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!