charts_03
Posted aWolfMan
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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 = \'\'; if (elementRef.textContent) { // Firefox elementValue = elementRef.textContent; } else if (elementRef.innerText) { // IE elementValue = elementRef.innerText; } else { // Default elementValue = elementRef.innerHTML; var regExp = /<\\/?[^>]+>/gi; elementValue = elementValue.replace(regExp, \'\'); } //alert(elementValue); return elementValue; } </script> </head> <body> <table border="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="click" onclick="this.value=getTableColumnValue(\'mytable\',1, 2);"> </body> </html>
以上是关于charts_03的主要内容,如果未能解决你的问题,请参考以下文章