How to pass one variable to another page or same page? So, Here I have given two file's code where one is data sending file. And another one is data receiving file if we transfer to another page. index.html <form action="#tp" method="get"> <input type="text" name="serialNumber" Value="rajnish" /> <input type="submit" value="Submit" /> </form> <div id="tp"> <div id="data"> </div> </div> <script> function processForm() { var parameters = location.search.substring(1).split("&"); var temp = parameters[0].split("="); l = unscape(temp[1]); document.getElementById("data").innerHTML = l; } processForm(); </script> Here above code will be used only when you want to pass a variable on one page only. <form action="#tp" method="get"> <i...
It's a blog for learn and know about one of the best web tools and tricks of web programming in the easiest way. So, If you want to stay updated with the technology follow the page now!!