I have a textbox for user input with a submit button. I would like for the user to be able to put in some input, and have the input appear in a list underneath the input box, maybe into a table using some kind of javascript function. To me this seems like a fairly simple concept but I can't find any tutorials that will show me how to do it, can anyone recommend any or tell me what the best, most attractive looking approach to this would be?
EDIT- Here's what I've tried:
<html>
<head>
</head>
<body>
<script type="text/javascript">
document.getElementById("add").onClick = function() {
var text = document.getElementById("idea").value;
var li = "<li>" + text + </li>;
document.getElementById("list").appendChild(li);
}
</script>
<input type='text' id = 'idea' />
<input type='button' value = 'add to list' id = 'add'>
<ul id= 'list'>
<li> <b>Topics</b></li>
</ul>
</body>
</html>