Question: Create a Web page that generates addition tables and multiplication tables for values zero through ten. The document should include buttons that open a new
Create a Web page that generates addition tables and multiplication tables for values zero through ten. The document should include buttons that open a new window that displays each table. Generate each table using the document.write() methods. Both tables can reuse the same window. Write two functions: additionTable() and multiplicationTable(). Each function is used by with the appropriate button. The code for additionTable() is as follows:

function additionTable) var tableWin-window.open(""mat hTables", "toolbar-no,menubareno, location-no, scrollbars-yes, resizable=no, width-500, height-400"); tablevin.document.open() tablewin.document.write("h1>Addition Table"; tablei in . document.write("rtable border-'1' width' 100%">"); tablevin.document.write(
" for (var i-0; i
"); tablewin. document.write("
); tablevin.document.write(K/table tablewin.document.close) tablewin.focus (); function multiplicationTable) i var tableWin-window.open(""mat hTables", "toolbar-no,menubareno, location-no, scrollbars-yes, resizable-no, width-475, height-400"); tablevin.document.open() tablevin.document.write("
Multiplication Table"); table! in . document.write("rtable border-'1' width-'100%">"); tablevin.document.write( xth>01234 5 6 th>78 9 xth>10 " var i-0; i" i " "); tablewin. document.write("(tr for (var k-0; k + curNum + ""); tablewin.document.write()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
