Use the random number to get an item from the array. var item = array[randInt];
Use document.getElementById to get the textbox you want, and use .value = to set the textbox’s value. var textbox = document.getElementById("textbox_id").value = randInt;