Parent form html document:
//alert(result: + result[0]); // Output the return value, result returns not a string, but an array
/////////The following is used to judge that when all the boxes in the add page of the mode are empty, there is no need to add a row in the main form.
var flag = 0; (result[i].match(/^s*$/)) {
;
! = undefined) {//
"myTable" ) );/ /Pass two parameters to the addRow method, one is the returned result and the other is the table to be operated on
/
/ /alert ( myTable );
. i++ ){//According to the result Create the corresponding number td 数
创 = Document.createElement (TD);
// add
tr.appndchild (TD); // Add to the back of tr
.myTable.appendChild(tbody); //Add the created tbody to the table to be displayed,
// The above is actually the process of creating html through the document object
----------//Create an event trigger for each tr row created
but /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////Proxy that when the mouse is moved,
tr.style.backgroundcolor = "#abcdef"; // Background color. Tr.tition = "Click to modify!"; // Reminder information};
tr. = Function () {////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////gang ////////////////////////////After the mouse is released
//Register Click event
tr.onclick = function(){//////////////////////////////////////// ////////////////////When the mouse clicks
Display the current row data in the cell collection cells
. /Create a temporary array to store to be passed to the modal dialog box The data of nerHTML;//Put the content in the cell of the selected row Temporary array
td in tr