Hi nauna,
Check this example. Now please take its reference and correct your code.
HTML
HTMLPage1
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript">
function Send() {
var transationID = document.getElementById('txtTransationID').value;
var url = "HTMLPage2.htm?TransationID=" + transationID;
window.location.href = url;
}
</script>
</head>
<body>
TransationID:<input type="text" value="23" id="txtTransationID" />
<input type="button" value="Send" onclick="Send()" />
</body>
</html>
HTMLPage2
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript">
window.onload = function () {
if (window.location.search.split('?').length > 1) {
var id = window.location.search.split('?')[1].split('=')[1];
document.getElementById('hfTransationID').value = id;
}
}
</script>
</head>
<body>
<input type="hidden" id="hfTransationID" value="" />
</body>
</html>
If you want to use jQuery implementation refer below article.