I want to enter 2 values through textbox and when am click submit button i want to get it in another 2 textboxes.plz tell me how its code
how to display values
Collapse
X
-
for example
their is 2 textboxes and one button.am creating another 2 textboxes if am entering values in 1st 2 textboxes and enter button then the value should be display in another 2 textboxesComment
-
Hello,
Look at below code hope it might be help you..
Thanks & Regards,Code:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Test page</title> <script type="text/javascript" language="javascript"> function fill_value() { document.getElementById("txtbox3").value = document.getElementById("txtbox1").value; document.getElementById("txtbox4").value = document.getElementById("txtbox2").value; return false; } </script> </head> <body> <form name="test_form" id="test_form" method="post" action=""> <table border="0" cellspacing="0" cellpadding="5"> <tr> <td>Enter Text 1<br /><input type="text" name="txtbox1" id="txtbox1" value="" /></td> <td>Enter Text 2<br /><input type="text" name="txtbox2" id="txtbox2" value="" /></td> </tr> <tr> <td><input type="text" name="txtbox3" id="txtbox3" value="" /></td> <td><input type="text" name="txtbox4" id="txtbox4" value="" /></td> </tr> <tr> <td> </td> <td><input type="submit" value="Submit" name="submit" onclick="return fill_value()" /></td> </tr> </table> </form> </body> </html>
Mayur BhayaniComment
Comment