Hey Scott, thanks for the help, it works.I have two more question:
<link href="CSS/mfcssp.css" rel="stylesheet" type="text/css" /><script type="text/javascript">function Listing (Num) { var i = 0 for (i = 0; i < Num; i++){ document.write ('<li class="listd"><a class="linkstd" href="#">Link</a></li>') }}</script></head><body><ul class="liststd"> <script type="text/javascript"> var i = 0 for (i = 0; i < 10; i++){ document.write ('<li class="listd"><a class="linkstd" href="#">Link</a></li>') } </script> <input type="button" onclick="Listing (10)" value="Click me!" /></ul></body>
1. With the script that is defined in the body, everything works fine and the output is 10 links styled with "linkstd" class inside <li> elements with class "listd", but when the function Listing is called by the button, the output is 10 links in <li> tags but neither of them has the class applied. Does it have to do something with the script being in the head?2. When the page loads, two things are visible on it; the 10 links listed by the script in the body and the button. When I press the button, all of that goes away and the function Listing's output shows. How can I make the previous list and the button stay on the page?TNXMartin