Right now Iam working on a Students Data table. I made a button in my script but Iam not sure how you would make it so on click it would display my table? <input type= "button" Name="Grades Of all Students" onclick=
My other question is there away so that can I use StudentsData[0]from my array and put it in my table instead of typing <TD> 120</TD>. like document writIn (StudentsData[0]);
Here is my example code so Far
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
StudentsData = new Array (28);
StudentsData[0] = 120;
StudentsData[1] = 145;
StudentsData[2] = 234;
StudentsData[3] = 250;
StudentsData[4] = 278;
StudentsData[5] = 279;
StudentsData[6] = 300;
StudentsData[7] = "John Miller";
StudentsData[8] = "Cathy Johnson";
StudentsData[9] = "Bill Newton"
StudentsData[10] = "Jenny Bolton";
StudentsData[11] = "Bill Manson";
StudentsData[12] = "Kim Anderson";
StudentsData[13] = "Bob Newman";
StudentsData[14] = 84;
StudentsData[15] = 92;
StudentsData[16] = 63;
StudentsData[17] = 74;
StudentsData[18] = 99;
StudentsData[19] = 91;
StudentsData[20] = 77;
StudentsData[21] = "B";
StudentsData[22] = "A";
StudentsData[23] = "D";
StudentsData[24] = "C";
StudentsData[25] = "A";
StudentsData[26] = "A";
StudentsData[27] = "C";
<input type= "button" Name="Grades Of all Students" onclick=
</script>
</Head>
<body>
<TABLE BORDER="1">
<caption align="Top">This is the Students Data</caption>
<TR> <TH>Student Number <TH> Name <TH> Score <TH> Grade </TH> </TR>
<TR> <TD> 120</TD> <TD> John Miller</TD> <TD>84 </TD> <TD> B </TD> </TR>
<TR> <TD> 145</TD><TD>Cathy Johnson</TD> <TD> 92</TD> <TD> A </TD> </TR>
<TR> <TD> 234</TD> <TD> Bill Newton</TD> <TD>63 </TD> <TD> D </TD> </TR>
<TR> <TD> 250</TD><TD>Jenny Bolton</TD> <TD> 74</TD> <TD> C </TD> </TR>
<TR> <TD> 278</TD><TD>Bill Manson</TD> <TD> 99</TD> <TD> A </TD> </TR>
<TR> <TD> 279</TD> <TD> Kim Anderson</TD> <TD>91 </TD> <TD> A </TD> </TR>
<TR> <TD> 300</TD><TD>Bob Newman</TD> <TD> 77</TD> <TD> C </TD> </TR>
</TABLE>
</body>
</html>