Jump to content

I am looking for some assistance


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 post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...