Jump to content

I am looking for some assistance


Oliazk

Recommended Posts

Hello all,I am trying to do an assignment I got from my teacher but I just for the life of me cant figure out how I am going to go about doing. If you dont mind helping that would be great I went ahead and made the page I am going to put the assignment on just need to figure out how to do it but look here.... http://www.oliazk.com/assign3.htmlI dont want the answer just some idea how to do it. I am externally linking the javascript file.Thanks for any help. :)

Link to comment
Share on other sites

ok... basically what is going to happen is that you are going to have a for loop. something likefor( i = 1;i<5;i++){//Code executed here...}What you would have to do would be one of 2 things, since you are apparetly learning Javascript, i'll go with the less complex one.have the javascript print out a table tag before the loop. IEdocument.write("<table>");and then have it echo the closing table tag AFTER the for loop;FOR LOOP HEREdocument.write("</table>";from there you woudl take the variable "i" and multiply it by 10,100, and 1000, thusly storing these 3 values in 3 different variables and then echoing them like:document.write("<tr>\n<td>"+times10Var+"</td>\n<td>\n"+times100Var+"</td><td>\n"+times1000var+"</td>\n</tr>\n");Have fun.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...