in microsoft word there is a button u click on in the header and footer section where for each page a number appears that acts as the page number. so obviously if your on page 1 it will say 1, page 2 it will say 2. and so on. now im doing some basic html and javascript and for my assignment i have to make a list of unordered items (which i know begins and ends with the <ul><li> text here </li></ul>) but in the "text here" area i would like to have somethin like that page number in microsft word only in javascript. for example on a webpage im supposed to have a text box where the user can type in a number and click on a button that will then lead them to a result. so if the question is "how many ingredients will you need to bake a cake" and they randomly put in the number 3, i will need to then reply with an unordered list saying "ingredient 1", "ingredient 2", "ingredient 3" i got everything but the number part of the situation. <html><head> <script language="JavaScript"> function message(num){ count=1; while (count<=num) { document.write('<ul><li>Ingredient </li> </ul>'); count = count+1; } } </script></head><body> <br> <p> </p><form name="myform"> How many ingridients do you need to bake a cake? <br> How many times do you have to write it? <input name="number" size="3" type="text"> <input value="Find Recipe" onclick="message(document.myform.number.value) " type="button"> </form> </body></html>