Could you tell me how to add the text from text field to the array so it is displayed at the top of text field? Thanks
<div id="test">
<p id="items"></p>
<input type="text" id="color" />
<input type="button" id="add" value="Add" />
</div>
<script>
var theArray = new Array("Red", "Green", "Blue");
var target = $("#items");
for (var i = 0; i < theArray.length; i++) {
target.append("<p>" + theArray[i] + "</p>");
}
$("#add").click(function () {});
</script>