我需要从表格中获取一些数据并进入谷歌图表,但我迷失了如何正确循环它
HTML
<tr>
<th>Date</th>
<th>Score</th>
<th>Result</th>
</tr>
<tr>
<td class="date">24/12/2012</td>
<td class="score">51</td>
<td class="result">30<span class="over"></span></td>
</tr>
<tr>
<td class="date">28/12/2012</td>
<td class="score">52</td>
<td class="result">31<span class="over"></span></td>
</tr>
<tr>
<td class="date">02/12/2012</td>
<td class="score">44</td>
<td class="result">19<span class="over"></span></td>
</tr>
这是谷歌图表javascript
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Date', 'Score', 'Result'],
[date, score, result],
]);
我猜我需要这样的东西......
var date = $this.find(".date").html();
var score = $this.find(".score").html();
var result = $this.find(".result").html();