Должно выглядеть как то так:
js1.html:
<input id="user_name" name="YourNAME">
<input type="button" onclick="submitNAME()" value="Send">
<script>
function submitNAME() {
window.location = "js2.html?username="+document.getElementById("user_name").value;
}
</script>
js2.html
<body>
</body>
<script>
var found = window.location.search.match(/\w+\=(\w+)\,?/i);
var p = document.createElement('p');
p.innerText = found[1];
document.body.appendChild(p);
</script>
Удачи!