Passing of values from one html page to another html page using javascript And below is my code: Fisrt page as html1.html:
<!DOCTYPE html>
<html>
<head>
<script>
function newDoc()
{
window.location.assign("html2.html");
}
</script>
</head>
<body>
<input type="button" value="submit" onclick="newDoc ()">
</body>
</html>
And the second html code as html2.html:
<!DOCTYPE html>
<html>
<head>
<script>
function newDoc()
{
window.location.assign("html1.html");
}
</script>
</head>
<body>
<input type="button" value="submit" onclick="newDoc ()">
</body>
</html>