Updating values of a form


Is there a way in Javascript i can update the element with id #container to be the value of the #name?

<form action="" method="post" name="form_name" id="form_name">


<label for="your_name">Enter Name</label>

<input type="text" name="your_name" id="your_name" />

<input type="submit" />



<p>Hello <span id="container"></span></p>

So the <span> would contain the result of the submission of the form?

Is this possible?

Nice and simple :slight_smile:

<form action="" method="post" name="form_name" id="form_name" onsubmit="document.getElementById('container').innerHTML=this.your_name.value; return false;">