Retrieving Input Values from a Text Box
<p>I need to make a box so that when the user enters a value of one through 6, it rolls that many dice. I'm a complete beginner to javascript and any help would be greatly appreciated.</p>

<p>Here's my function:</p>

<pre><code>function NumberValue() {
        for (i = 0; i &lt;['randNumber']; i++){
            var numberRoll = Math.floor(Math.random() * 6) + 1;
            var userNumber = '../images/die' + numberRoll + '.gif';
            myNewTag = "&lt;img id='dieImgRandom' src='" + userNumber + "'&gt;"
            document.getElementById('dieDivRandom').innerHTML += myNewTag;
</code></pre>

<p>And here is my body element:</p>

<pre><code>&lt;h1&gt;Why don't you pick please?&lt;/h1&gt;

&lt;div id="dieDivRandom" style="text-align:center"&gt;

&lt;p&gt;

&lt;div id="dieImageRand"&gt;

&lt;img id="dieImgRandom" alt="die image" src="../images/die1.gif"&gt;

&lt;br&gt;

&lt;input type="text" id="randNumber" size=20 value="Enter 1 through 6"&gt;

&lt;input type="button" value="Click to Roll" onclick="NumberValue();"&gt;

&lt;/div&gt;
</code></pre>

<p>The function needs to allow a user to submit the number one, two, three, four, five, or six, and that many images need to display on the screen. The images a relocated in my images folder, so relative links will work just fine. That's actually what I need to use. Thank you.</p>
