Hi guys

I've written a javascript function that adds a new form input box when a button is pressed. The problem is that when I add text to an input textbox and then press "add a new button" the contents of the previous input textbox is lost.

Here is my javascript code, can anyone help me keep my input value when adding a new input textbox?
    document.addQuestion.answerCount.value = parseFloat(document.addQuestion.answerCount.value) + 1;
    var x = document.getElementById("inputs");
    x.innerHTML += "<input type=\"text\" class=\"questionAnswerBox\" name=\"answer"+document.addQuestion.answerCount.value+"\"/>";
Many thanks for all your suggestions.