Look at the below script.
form1 is the name of the Form.
Below is the working example script where you can see the entire functionality.
<form action="" method="post" name="form1">
<input type="text" value="testvalue" />