DOM tiny-demo
<script type="text/javascript" language="javascript">
var i = 4;
function addVoteOption(){
var voteP = document.getElementById("voteOptionList");
var inputText = document.createTextNode("option"+(i++)+":");
voteP.appendChild(inputText);
var inputP = document.createElement("input");
inputP.type= "text";
inputP.name = "voteOption";
voteP.appendChild(inputP);
var brP = document.createElement("br");
voteP.appendChild(brP);
}
</script>