首页 > 代码库 > charts_03

charts_03

table 数值获取:

1.http://www.w3school.com.cn/jsref/dom_obj_all.asp

2.http://blog.csdn.net/xs_zgsc/article/details/8444695#

3.http://www.jb51.net/article/49780.htm

4.http://www.iteye.com/problems/81941

5.http://www.cnblogs.com/umlzhang/archive/2011/10/18/2216189.html

6.http://www.cnblogs.com/umlzhang/category/467501.html

<!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>

    <title></title>
    <script type="text/javascript">
        function getTableColumnValue(tableId, rowNumber, columnNumber) {
            var tableRef = document.getElementById(tableId);
            var elementRef = tableRef.rows[rowNumber].cells[columnNumber];
            var elementValue = http://www.mamicode.com/‘‘;"1" id="myTable">
            <tr>
                <td>aa</td>
                <td>bb</td>
                <td>cc</td>
            </tr>
            <tr>
                <td>dd</td>
                <td>ee</td>
                <td>ff</td>
            </tr>
            <tr>
                <td>gg</td>
                <td>hh</td>
                <td>ii</td>
            </tr>
    </table>

    <input type="button" value="http://www.mamicode.com/click" onclick="this.value=http://www.mamicode.com/getTableColumnValue(‘mytable‘,1, 2);">

</body>

</html>

  

 

charts_03