- 分享
- 0
- 人气
- 0
- 主题
- 14
- 帖子
- 617
- UID
- 227559
- 积分
- 4976
- 阅读权限
- 22
- 注册时间
- 2009-5-16
- 最后登录
- 2021-4-14
- 在线时间
- 5701 小时
  
|
本帖最后由 希涯 于 2012-1-18 03:50 AM 编辑
- <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>
复制代码 上面是两个row的data 各自都有View 和 Change button
比方说 我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
请问有没有什么办法? |
|