我想使用onclick函数来增加变量[增加变量付费]
默认为0,我希望以1递增。
我试试这段代码:onclick ='paid ++'但是没有用......
foreach($query as $index=>$row) {
echo ($colorCount++%2) ? "<tr class='alt'>" : "<tr>";
echo "<td class='" . getPaidColor($row['paid']) . "' onclick='paid++ '></td>";
echo "<td class='" . getDelayColor($row['hour']) . "' onclick='postDeleteForm(" . $index . ")'></td>";
foreach($columns as $column) {
echo "<td>" . $row[$column] . "</td>";
}
}