JavaScript - Javascript For Generating A Multiplication Table
Ok, just to be honest this is for my assignment from my University, I have completed the whole code myself I just can't seem to get just one little thing.
Code: function GenerateTables(){ var start = document.tables.start.value; var end = document.tables.end.value; var size = document.tables.size.value; for (start; start <= end; start++) { document.write("<table width='100' align='center'>") document.write("<caption><b>Table of </b>" + start + "</caption><br>") document.write("</table><br>") for (var i = 1; i <= size; i++) { document.write("<table border=1 align='center'>") document.write("<tr height=40 align='center'>") document.write("<td width=40 align='center'>" + start + "</td>") document.write("<td width=40 align='center'> * </td>") document.write("<td width=40 align='center'>" + i + "</td>") document.write("<td width=40 align='center'> = </td>") document.write("<td width=40 align='center'>" + start * i + "</td>") document.write("</tr>") document.write("</table>") } } } The function generates multiplication tables depending on the input user provides using this interface (given below). And it generates them like this (given below). Now what I want is to generate those tables sideways not downwards. Not all the tables, but it should complete one table downwards, then start the new table on its side. I can't seem to figure out anything that would make that happen, and ideas would be appreciated, thanks. Regards, Papichoolo. Similar TutorialsI am trying to allow the user to type in two numbers and then a multiplication table pops up below it. It works however I cannot figure out how to make the first row be 0,1,2,3,4,5..ect and same for the first column in each row going down the table. Here is my code.. Code: <html> <head> <title>Untitled</title> <script> function f(x,y) { if((x < 3) || (y < 3) || (x > 10) || (y > 10)){ alert("Please enter numbers between 3 and 7") }else{ s = "<table border = '1'>" var total; for (i=0; i<=x; i++){ s+= "<tr></tr>"; for (j=0; j <= y; j++){ total = i * j; s+="<td>"+ total +"</td>" } } s+="</table>" document.getElementById("Q").innerHTML+=s } } </script> </head> <body> [enter a number between 3 and 10] <form id = "form1"> <input id = "a" value = "6"> by <input id = "b" value = "8"><br> <input type = "button" onclick = "f(a.value,b.value)" value = "Click here when ready!"> <br> </form> <div id = "Q"></div> </body> </html> Hi, I am having a hard time to display a table with user preference of how many rows/columns to create a multiplication table. I think I have to user DOM but I am not sure and I am not sure how to use it. My question is, how do I get the user input to use as a dynamic array input in a for loop so I can create the multiplication table using CSS ? Here is my code: [CODE] Hi, I am having a hard time to display a table with user preference of how many rows/columns to create a multiplication table. I think I have to user DOM but I am not sure and I am not sure how to use it. My question is, how do I get the user input to use as a dynamic array input in a for loop so I can create the multiplication table using CSS ? Here is my code: Code: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title> Multiplication table web page </title> <style type="text/css"> h2 {text-align: center;} table {position:absolute;left:300px;} </style> </head> <body> <h2>Multiplication Table</h2> <script type="text/javascript"> <!-- var size; do { size = prompt("What size table do you want?","10"); } while ((size < 1) || (size > 15)); document.write("<table border=\"5\" cellpadding=\"5\" cellspacing=\"5\">"); document.write("<tr><th> *</th>"); for(var i = 0; i < 10; i++) { for(var j = 0; j < 10; j++) { size = i * j; } } document.write("</table>"); // --> </script> </body> </html> Hello, I am trying to write a javascript page that shuffles an array of questions ( 1x1 , 1x2, 1x3 - 1x12), prints them, then has the user type in the answer, then checks them to make sure the user answer is correct. I have looked up a lot of source code for javascript "quiz" but they all are multiple choice answers and the questions are not shuffled. This is as far as I have gotten, but now I am not sure how to take the user input text and compare them to the answer / question array to make sure to check. Code: <html> <head> <title> Slick Math </title> <script type="text/javascript"> var quest = new Array; var ans = new Array; var questprint = new Array; quest[0] = "1 x 1 "; quest[1] = "1 x 2 "; quest[2] = "1 x 3 "; quest[3] = "1 x 4 "; quest[4] = "1 x 5 "; quest[5] = "1 x 6 "; quest[6] = "1 x 7 "; quest[7] = "1 x 8 "; quest[8] = "1 x 9 "; quest[9] = "1 x 10 "; quest[10] = "1 x 11 "; quest[11] = "1 x 12 "; questprint[0] = quest[0]+"<input type='text' name='q0'></input><br/>"; questprint[1] = quest[1]+"<input type='text' name='q1'></input><br/>"; questprint[2] = quest[2]+"<input type='text' name='q2'></input><br/>"; questprint[3] = quest[3]+"<input type='text' name='q3'></input><br/>"; questprint[4] = quest[4]+"<input type='text' name='q4'></input><br/>"; questprint[5] = quest[5]+"<input type='text' name='q5'></input><br/>"; questprint[6] = quest[6]+"<input type='text' name='q6'></input><br/>"; questprint[7] = quest[7]+"<input type='text' name='q7'></input><br/>"; questprint[8] = quest[8]+"<input type='text' name='q8'></input><br/>"; questprint[9] = quest[9]+"<input type='text' name='q9'></input><br/>"; questprint[10] = quest[10]+"<input type='text' name='q10'></input><br/>"; questprint[11] = quest[11]+"<input type='text' name='q11'></input><br/>"; var score = 0; ans[0] = 1; ans[1] = 2; ans[2] = 3; ans[3] = 4; ans[4] = 5; ans[5] = 6; ans[6] = 7; ans[7] = 8; ans[8] = 9; ans[9] = 10; ans[10] = 11; ans[11] = 12; function shuffle() { return (Math.round(Math.random())-.5); } questprint.sort(shuffle); </script> </head> <body> <h1>Slick Math</h1> <form name="form"> <script type="text/javascript"> document.write(questprint[0]); document.write(questprint[1]); document.write(questprint[2]); document.write(questprint[3]); document.write(questprint[4]); document.write(questprint[5]); document.write(questprint[6]); document.write(questprint[7]); document.write(questprint[8]); document.write(questprint[9]); document.write(questprint[10]); document.write(questprint[11]); </script> </form> </body> </html> Thanks =] I CANNOT GET THIS! I created a for loop to generate a specified number of input type fields onto the page within my form. The for loop will not work! to my knowledge all the code within the for loop is correct... please help me out! Here is all the code regarding this problem... Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>History Countdown</title> <style> div#mainChart { display: none; } fieldset#main { padding: 20px 0 20px 20px; text-align: left; width: auto; min-width: 400px; } fieldset#moreInfo { padding: 20px 0 20px 20px; text-align: left; width: auto; min-width: 200px; margin: 20px; display: none; } table { margin: 0; padding: 0; } td { padding-right: 25px; } </style> <script> function enterData() { document.getElementById("moreInfo").style.display = "block"; var start = document.getElementById("startNumber").value; var end = document.getElementById("endNumber").value; var thisNumber = Math.abs(start - end); var dataFields = thisNumber + 1; alert(dataFields); setTimeout(makeFields, 500); function makeFields() { for (var i=1;i<=dataFields;i+=1){ var newNode = createElement("tr"); var newTD = createElement("td"); newTD.appendChild(document.createTextNode("Data for field " + i)); newNode.appendChild(newTD); document.getElementById("dataTable").appendChild(newNode); var newTD2 = createElement("td"); var newInput = createElement("input"); newInput.id = "data" + i; var attr1 = document.createAttribute("type"); attr1.nodeValue = "text"; newInput.setAttribute(attr1); newTD2.appendChild(newInput); newNode.appendChild(newTD2); document.getElementById("dataTable").appendChild(newNode); } } }//end makeFields function </script> </head> <body> <div id="wrapper"> <form name="dataForm" id="chartCreator"> <h1>Countdown Chart</h1><br /> <fieldset id="main"> <table> <legend>Chart Details</legend> <tr><td>Name of chart</td> <td><input name="countdownName" id="countDownName" type="text"></td> </tr> <tr><td>Start Countdown at...</td> <td><input name="BeginNumber" id="startNumber" type="text" value="1"></td> </tr> <tr><td>End Countdown at...</td> <td><input name="BeginNumber" id="endNumber" type="text" value="2011"></td> </tr> <tr><td><input type="button" value="Continue..." id="generateChart" onclick="enterData();" /></td> </tr> </table> <fieldset id="moreInfo"> <legend>Data</legend> <table id="dataTable"> <tr><td><input type="button" value="Create Chart!" id="generateChart" onclick="build();" /></td> </tr> </table> </fieldset> </fieldset> </form> </div> </body> </html> I am working on a work project that requires a 5*5 table, that will generate random letters in each cell upon button click. I have most of the coding complete with the exception of the letter generation. I am currently generating numbers, I would even be fine with having a RandBetween(and listing the 26 letters of the alphabet) at this point. Any suggestions? Code: <script type="text/javascript"> var random1, random2, random3, random4, random5, random6, random7, random8, random9, random10, random11, random12, random13, random14, random15, random16, random17, random18, random19, random20, random21, random22, random23, random24, random25; var randomArray = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]; //generate the random characters function CreateCellData() { for (var i=0; i<randomArray.length; i++) { randomArray[i] = Math.floor(Math.random()*99 + 1); } } I'm almost finished with this app for XUL / HTML Table Generation, and i have a really strange problem... The HTML strings in the Arrays can be changed, and the HTML file saved, and the HTML page reloaded, and the changes will render. However, i have one array, no matter what i change the HTML strings to, it refuses to render the changes made to the HTML strings. It's quite confusing... the array in question is Code: // Humidor InnerHTML HumidorInnerHTML[0] = "<img src='NoImage.gif' style='height:100px; width:100px;'>"; HumidorInnerHTML[1] = "<input type='textbox' id='Others_Caption" + HumidorIndex + "'>"; HumidorInnerHTML[2] = "<input type='textbox' value='85' id='Others_Height" + HumidorIndex +"'>"; HumidorInnerHTML[3] = "<input type='textbox' value='85' id='Others_Width" + HumidorIndex +"'>"; HumidorInnerHTML[4] = "<img src='NoImage.gif' style='height:100px; width:100px;'>"; HumidorInnerHTML[5] = "<img src='NoImage.gif' style='height:100px; width:100px;'>"; HumidorInnerHTML[6] = "<img src='delete.png' onClick=DeleteRow('" + HumidorIndex + "','Humidor_Table');>"; HumidorInnerHTML[7] = "<img src='add.png' onClick=AddRow('" + HumidorIndex + "','Humidor_Table');>"; and the function that generates the HTML Table on the fly (and adds the cell data to them) is he Code: function AddRow(index, DIV) { MyTable = document.getElementById(DIV); var newCell; var newRow = MyTable.insertRow(index); var Length; switch (DIV) { case "Intro_Table" : Length = IntroInnerHTML.length; break; case "Image_Table" : Length = ImageInnerHTML.length; break; case "Watch_Table" : Length = WatchInnerHTML.length; break; case "Others_Table" : Length = OthersInnerHTML.length; break; case "Humidor_Table" : Length = HumidorInnerHTML.length; break; } for (var i = 0; i < Length; i++) { newCell = newRow.insertCell(i); switch (DIV) { case "Intro_Table": newCell.innerHTML = IntroInnerHTML[i]; break; case "Image_Table": newCell.innerHTML = ImageInnerHTML[i]; break; case "Watch_Table": newCell.innerHTML = WatchInnerHTML[i]; break; case "Others_Table": newCell.innerHTML = OthersInnerHTML[i]; break; case "Humidor_Table": newCell.innerHTML = WatchInnerHTML[i]; break; } } // Update the Index Counters switch (DIV) { case "Intro_Table": IntroIndex++; break; case "Image_Table": ImageIndex++; break; case "Watch_Table": WatchIndex++; break; case "Others_Table": OthersIndex++; break; case "Humidor_Table": HumidorIndex++; break; } } when the page is loaded, the Init() function is started, that code is he Code: function Init() { AddRow(1, "Intro_Table"); AddRow(1, "Image_Table"); AddRow(1, "Watch_Table"); AddRow(1, "Humidor_Table"); AddRow(1, "Others_Table"); } Did i miss something? there must be something i've over looking. I have even tried isolating some other external JS, and CSS includes that i have, and isolating them has no change in the result. the html file is live he http://kevinjohnson.clanteam.com/XML...anageSite.html thanks I'm new to programming, Here's my problem: I'm using a for loop to generate a list of hyperlinks for(i = 100; i < 200; i++) { var str = "link"; document.write(str.link('http://someWebsite.com/' + i +'.html')); document.write("<br />"); } so the list that is generated looks like... link link link ---------and so on until the loop is finished. My question: is it possible for each links text to be dependent on the pages title? for example instead of the the text "link", the program would follow the URL and know in the pages header was the title "Bob's website" or whatever the pages title was and would generate the list. Example: bobs website daves website rons website susies website betsys website ______________________________ Any help to differentiate the links text based on following the URL would be helpful Thank you! So I'm trying to dynamically generate MathML code. I can get this to work on Internet Explorer 8 + MathPlayer, Firefox 3.6, and Opera 11: test1.xht: Code: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head><title></title></head> <body> <math xmlns="http://www.w3.org/1998/Math/MathML"> <mfrac> <mrow> <mi>x</mi> <mo>−</mo> <mn>4</mn> </mrow> <mrow> <msup> <mi>x</mi> <mn>2</mn> </msup> <mo>−</mo> <mn>3</mn> <mi>x</mi> <mo>−</mo> <mn>4</mn> </mrow> </mfrac> </math> </body> </html> But this only works on Firefox: test2.xht: Code: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <script type="text/javascript" src="test2.js"></script> <title></title> </head> <body></body> </html> test2.js: Code: window.onload = test; function test() { var math = "<math xmlns=\"http://www.w3.org/1998/Math/MathML\">" math += "<mfrac>"; math += "<mrow>"; math += "<mi>x</mi>"; math += "<mo>−</mo>"; math += "<mn>4</mn>"; math += "</mrow>"; math += "<mrow>"; math += "<msup>"; math += "<mi>x</mi>"; math += "<mn>2</mn>"; math += "</msup>"; math += "<mo>−</mo>"; math += "<mn>3</mn>"; math += "<mi>x</mi>"; math += "<mo>−</mo>"; math += "<mn>4</mn>"; math += "</mrow>"; math += "</mfrac>"; math += "</math>"; document.getElementsByTagName("body")[0].innerHTML = math; } Sorry for the code dump and for being such a n00b and thanks for any help. I have javascript function which calculates the product of two numbers. function fnCalculate() { var lat1=price * num; } Here for eg if price is 19.50 and num is 1 then o/p should be 19.50 and not 19.5 as its resturning now. Also if price is 15.00 and num is 1 then o/p should be 15.00 and no just 15. Is it possible ... someone please help Hello, Could someone help me with this problem? I'd like the posted result to be a number with two decimals. I know how to make this normally but not with this kind of script. Thanks very much in advance! Code: <html> <head> <script type="text/javascript"> function calcResult(){ document.getElementById('result').innerHTML = ''; var num1 = newNumber(document.getElementById('txt1').value); var num2 = 0.429; var num3 = 1; if(isNaN(num1) || isNaN(num2)){ alert('Please enter a number'); } else { document.getElementById('result').innerHTML = num1 * num2; document.getElementById('entry').innerHTML = num1 * num3; } } window.onload=function(){ document.getElementById('btnCalc').onclick = calcResult; document.getElementById('btnCalc').onclick = calcEntry; } </script> </head> <body> <p> <input type="text" id="txt1" size="5" value="" maxlength="5" /> <button id="btnCalc">Calculate</button> </p> <p> <span id="entry"></span> × 0.429 = <span id="result"></span> </p> </body> </html> My issue is that I have a javascript function applied on page load via an addLoadEvent function call in the head to every row (dynamic number of records retrieved) on a table. On every row of the table I also have an element (image or button) that performs a different function that is assigned on the element itself. Unfortunately, when I click the element it also performs the function that was applied to the row in the page load. Is there any way to not call this function on element click? I know usually you include code, but due to the nature of the work I am limited in that respect. Basically its: Code: <script type="text/javascript"> addLoadEvent(function() { function1(1); }) //function1 makes the table rows do something appearance wise. </script> <tr> <td></td> <td></td> <td> <img src="pics/delete.png" alt="Delete" onclick="function2();"> </td> </tr> I apologize if my post doesn't conform to the general guidelines of proper posting on this board. I'm new on this site. I'm trying to find a much simpler way than this current script I am using to generate and print a random word. I don't want to have to name each word but instead just include a very large list of about 300,000 words that javascript uses to pull a random word out of. Can you please help me out?? The list of words I have is a straight list with no commas or anything. I am currently outputting to a text box, but I am looking to generate words according to users input. For example, a user wants 500 words starting with the letter "b" and is less than 5 characters long appended to the character "de." Any help would be awesome! Even a right direction. I'm also willing to pay some for such a script if need be. Thanks! Here's my code: Code: <SCRIPT LANGUAGE="JavaScript"> <!-- var NumberOfWords = 28 var words = new BuildArray(NumberOfWords) words[1] = "czarevitch" words[2] = "brightwork" words[3] = "verkrampte" words[4] = "protectrix" words[5] = "nudibranch" words[6] = "grandchild" words[7] = "newfangled" words[8] = "flugelhorn" words[9] = "mythologer" words[10] = "pluperfect" words[11] = "jellygraph" words[12] = "quickthorn" words[13] = "rottweiler" words[14] = "technician" words[15] = "cowpuncher" words[16] = "middlebrow" words[17] = "jackhammer" words[18] = "triphthong" words[19] = "wunderkind" words[20] = "dazzlement" words[21] = "jabberwock" words[22] = "witchcraft" words[23] = "pawnbroker" words[24] = "thumbprint" words[25] = "motorcycle" words[26] = "cryptogram" words[27] = "torchlight" words[28] = "bankruptcy" function BuildArray(size){ this.length = size for (var i = 1; i <= size; i++){ this[i] = null} return this } function PickRandomWord(frm) { var rnd = Math.ceil(Math.random() * NumberOfWords) // Display the word inside the text box frm.WordBox.value = words[rnd] } //--> </SCRIPT> 1st, Hi Coding forums! I'll get to the point, I'm a noob -.- I'm using greasemonkey for a certain website. Basically, I'm using gm to refresh the page after a certain time, I was however wondering, If I can set it to a random number between 2 specific times? The code I'm using atm is setTimeout(function() { document.location.reload(); } , 10000); I know I have to use math.random, well, I think I do. But I'm not sure how to do it between 2 certain times? So to summarise, I'm trying to refresh a page at any given random time between say 5-10 minutes. Any help is appreciated, thanks! Hello, I have this idea, but I wouldn't want to reinvent the wheel if it's already been done. I want to generate perspective grid on canvas depending on browser window size, something like this, but without textures: http://www.123rf.com/photo_2651286_a...rspective.html Do someone of you guys know if some similar script already exists? Or at least some tips on how not to end up writing a 1000 lines script (At this point I would just drop the idea)? All thoughts appreciated. P.S. even an obscure algorithm would probably suffice, 'cause the main problem I'm struggling with is diminishing size perspective calculations Hi all, I have been checking out this web audio api app Beat Petite The thing that really interests me about it is that as the user alters the interface settings the URL changes, and all the settings can be recalled just by saving the URL (so if you make a cool drum beat you can share it with your friends by giving them the URL). I would love to be able to implement this feature on my own site but I have no idea where to start! Can anyone shed any light on how this can be done? I am not even sure if this is JavaScript that is controlling this or some other technology. Any ideas would be much appreciated. Thanks, Hulk I found this code in another thread... basically, I need to be able to display a certain image based on the page's title... for instance if the title is: Lotus 7, I need image lotus.jpg to display in an element on the page, however, if the title is Bodhi 9, I need image bodhi.jpg to display in the same element. Can someone help me implement this code? Code: var imgs = new Array(); imgs[0] = new Array(); imgs[0][0] = "Research"; imgs[0][1] = "bluetabs_01"; imgs[0][2] = "greentabs_01.gif"; imgs[1] = new Array(); imgs[1][0] = "Information" imgs[1][1] = "bluetabs_02"; imgs[1][2] = "greentabs_02.gif"; Code: var title = document.title; for (var i=0;i<imgs.length;i++){ if (title.indexOf(imgs[i][0])!=-1){ document.images[imgs[i][1]].src = imgs[i][2]; break; } } New to JS, and not too good at it. Trying to take some prewritten code and add script that displays some random text. Having trouble with assignment. Instructions are to replace a section of the file I am given with a script element. In the script element I am suppose to declare a variable named tipNum equal to a random integer between 1 and 10 returned by the randInt() function (which I made and have shown below). Then I am suppose to use a series of document.write() methods to write the following HTML code into the page: Code: <h1>Random Tip<br />title</h1> <p>tip</p> (Where "title" is the title of the random text as generated by the tipTitle() function from a external file, and which I did not make; and "tip" is the text of the random tip as genereated by the tipText() function, which is also from the external file, and not made by me) My code for the randInt() function is Code: function randInt(lower, upper) { var size = ++(upper - lower); var randValue = Math.floor(lower + size*Math.random()); } The script I made to display the HTML code is Code: <script type="text/javascript"> var tipNum = randInt(1, 10); document.write("<h1>Random Tip<br />"+tipTitle(tipNum)+"</h1>"); document.write("<p>tipText()</p>"); </script> I am getting nothing on my page where the random text should be. Any help or advice would be great, thanks. I want a certain amount of image spots to show a certain set of images (specifically 8) in a random order every time the page is refreshed. I do not want the images to be repeated, however. The solution I came up with was to create an array and generate a number one to eight and then compare that number to the numbers previously in the array, and if it matched one that was previously generated, to generate a new number and then compare it. This continues until i have an array of the numbers 1-8 in a random order. Code: var imgs=new Array(8); for(i in imgs) { function generate() { return Math.floor(1+Math.random()*8); } var rand=generate(); function compare(i) { for(var n=i-1; n>=0; n--) { if (n<0) { imgs[i]=rand; } else { if (rand==n) { rand=generate(); compare(i); } } } } } This does not strike me as the most efficient way to go about this. If someone has a better solution, that would help a great deal. Hello, I need help creating a function in javascript that produces random numbers generated from a normal curve distribution with a mean and standard deviation that I can specify (and easily change). I would like only whole numbers and the ability to set reasonable maximum and minimums. Thanks, Adrian Hello Everyone, So I am attempting to put a table within my JavaScript. However, everything that I try does not work. I have done a ton of research on how to do this but it's always with different scenarios, or it just does not work for me. Any hints would be appreciated, thanks! Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD xHTML 1.1//EN" "http://www.w3.org/TR/xhtml1/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Script-Type" content="text/javascript"/> <link rel="stylesheet" type="text/css" href="UNIT_3.css"/> <title></title> </head> <body> <script type="text/javascript"> <!-- document.write('<h1>Number Square<h1> <br/>'); document.write('<table>'); for(var intSquare = 1; intSquare <=10; intSquare++) { document.write('<tr>'); document.write('<td>' + intSquare + "" + intSquare + '</td>'); document.writeln(intSquare + "" + intSquare * intSquare); document.write('</tr>'); document.writeln("<br/>"); } document.write('</table>'); // --> </script> </body> </html> |