Home >Web Front-end >HTML Tutorial >Solution to the problem of transferring values between html pages
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>
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>
For more related articles on solutions to the problem of transferring values between html pages, please pay attention to the PHP Chinese website!