I wanted to get text from a textbox to display on the same screen. This is the code i have used but it doesn't seem to work. The text prints to the screen but the textbox disappears and I cant enter anything else.
Any help?

<script language='JavaScript'>

function getwords()
textbox = document.getElementById('words');
if (textbox.value != "")
document.write("You entered: " + textbox.value)
alert("No word has been entered!")

<input type="text" id="words" />
<input type="button" onclick="getwords()" value="Enter" />