- <tr style="background-color: #F0F0F0; ">
- <td class="leavehistory" style="width: 6%; padding: 7px;">1</td>
- <td id="leaveID" class="leavehistory" style="width: 9%;">LE000001</td>
- <td class="leavehistory" style="width: 12%;">2012-12-12 00:00:00.0</td>
- <td class="leavehistory" style="width: 10%;">2 days</td>
- <td class="leavehistory" style="width: 15%;">12122011 - 13122011</td>
- <td class="leavehistory" style="width: 15%;">Sick</td>
- <td style="width: 30%;"><select>
- <option value="0">Pending</option>
- <option value="1">Cancel</option>
- </select> <input class="button" type="button" name="bttn" onClick="cancelSub();"value="View"/><input class="button" type="button" name="bttnDelete" onClick="cancelSub();"value="Change"/></td>
- </tr>
-
- <tr style="background-color: #F0F0F0; ">
- <td class="leavehistory" style="width: 6%; padding: 7px;">2</td>
- <td id="leaveID" class="leavehistory" style="width: 9%;">LE000002</td>
- <td class="leavehistory" style="width: 12%;">2012-01-17 19:31:18.0</td>
- <td class="leavehistory" style="width: 10%;">2 days</td>
- <td class="leavehistory" style="width: 15%;">18/01/2012 - 19/01/2012</td>
- <td class="leavehistory" style="width: 15%;">Sick</td>
- <td style="width: 30%;"><select>
- <option value="0">Pending</option>
- <option value="1">Cancel</option>
- </select> <input class="button" type="button" name="bttn" onClick="cancelSub();"value="View"/><input class="button" type="button" name="bttnDelete" onClick="cancelSub();"value="Change"/></td>
- </tr>
比方说 我click LE000001 那个row的change button 我要用javascript拿到 LE000001 这个value
如果我click LE000002那个row的change button 我就会拿到 LE000002 这个value , 以此类推
这些data是我从database retrieve出来的 所以可能会有很多个row
我要做的当我按change button , database里的record ,status 就会从pending 改去 cancel ,所以我要拿到LE000001才能update去database
请问有没有什么办法?



