views:

65

answers:

1

Hi,

I was wonder how I could get input from a user, then display that input underneath on a new line along with any previous input.

I was wondering if this could be done in either HTML or Javascript

+6  A: 

At its most trivial:

<form>
  <input name="text" type="text"/>
  <input type="button" value=":)" onClick="document.getElementById('output').innerHTML+=form.text.value+'<br/>'"/>
</form>
<div id="output"></div>
Matt
Technically you don't even need a form: you can just use a naked <input> tag combined with a <button> tag.
htw
Hi MattYou are a genius. This is exactly what I was looking for. Thanks
I am even going to leave in the :)