A solution to the problem of HTML pages passing values to each other

Time:2020-2-10

The first time I used an essay, I felt it was quite awkward
a.html

Copy code

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” value=”123″ name=”hid”>
< input type = “submit” value = “submit” >
</FORM>
</body>
</html>

b.html

Copy code

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>

Recommended Today

The basic syntax and function of triggers in SQLSEVER

What is a trigger? Triggers are stored procedures that are executed automatically when a table is inserted, updated, or deleted. A special stored procedure that is automatically executed when a trigger inserts, updates, or deletes a table. Triggers are generally used for more complex check constraints. The difference between a trigger and a normal stored […]