My English is not good enough so I hope you understand what\'s my problem...
I have a page \'A\' with a form. When I click Submit, I want it to open/redirect to a pa
Following is the exact solution that you want.
Page 'A' (a.html)
<html>
<head>
</head>
<body>
<form action="b.html" method="get" name="form1" id="form1">
<input type="text" name="field1">
<input type="submit" name="submit">
</form>
</body>
</html>
Page 'B' (b.html)
<script>
alert(findGetParameter("field1"))
function findGetParameter(parameterName) {
var result = null,
tmp = [];
location.search
.substr(1)
.split("&")
.forEach(function (item) {
tmp = item.split("=");
if (tmp[0] === parameterName) result = decodeURIComponent(tmp[1]);
});
return result;
}
</script>
Can't be PHP? With PHP you can also send the info to page B and display to user all the info. In fact, is more user friendly because it's a server side process.