I have a HTML form on 'page1.html' with four elements (textbox1, textbox2, listbox1, listbox2). on clicking submit, i want the values of these elements to be posted in table to new page (page2.html)
Table in page 2 is as follows:
Please help
With plain html
and javascript
you can do like this
page1.html
<input type="text" id="txt1" />
<input type="button" value="Submit" onclick="postData()" />
javascript
function postData(){
var val = document.getElementById("txt1").value;
var tbl = "<table><tr><td>"+val+"</td></tr></table>";
var w = window.open("page2.html");
w.document.write(tbl);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With