用户按下输入数字按钮后,如何在文本框中显示用户输入的数字。不能让它工作。
function userNumbers()
{
var usersNumbers = new Array(5)
for(var count = 0; count <=5; count++){
usersNumbers[count]=window.prompt("Enter your number "+(count+1)+": " );
}
document.lotto.usersNumbers.value = output;
}
<table width=100% border=0>
<tr>
<td>
<p><input type=button value="Enter your numbers" onClick="userNumbers()"></p>
Your Numbers:
<textarea name="usersNumbers" rows=1 cols=20></textarea>
</td>
</tr>