0

I have a table with a check option column for each register. What I want to do is when one of the checks is available and press button "modify" It will appear the detail of the selected register in a new div.

Show and hide detail when button is pressed no problem. Fill the detail with the selected row is the problem.

how would you do it?

thanks all.

4

1 回答 1

0

反正也没那么难。

CodePen.IO 示例

function rowToDiv() {

    var row = document.getElementById("row1"),
        html = [];

    for( var i = 0, cells = row.children, ln = cells.length; i < ln; i++ ) {

        html.push( cells[ i ].innerText + " " );
    }

    alert( html.join('') );
}
于 2012-10-16T08:18:16.223 回答