Jamie
Jamie

Reputation:

dynamic building of a list

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

Upvotes: 1

Views: 134

Answers (1)

Matt
Matt

Reputation: 2902

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>

Upvotes: 6

Related Questions