I'm doing an assignment for class and I'm unable to figure this all out.

Here is the assignment:

Give the first div in the body an id of "diceHere". Create a function that populates "diceHere" after rolling, instead of hard-coding it into the body.

Add a text box that allows the user to request between 1 and 6 dice, then add a parameter to the function which passes that number through.

Make sure that your dice function also has a parameter for passing the paragraph id.

Create a variable that allows you to store a string that will write the proper number of die images to your page.

Here is what I have so far:

<!DOCTYPE html>
<title> Die Rolls </title>
<script type="text/javascript">
function diceRoll()
roll = Math.floor(Math.random()*(6) + 1);
imgName = 'die' + roll + '.gif';
document.getElementById('dieImg').src = imgName;


<div style="text-align:center" id=diceHere>

<img id="dieImg" alt="die image"

<input type="button" value="Click to Roll" onClick="diceRoll();">

Can anyone help me with this?