Get value from table with different element using jquery
Hi All ,
I am newbie for JQuery and i encounter a problem that tooks me so long , so that i try and get some help from you guys. below codes are my HTML codes and my problem is i have different element inside table.
i have checkbox , textbox , button inside my table . my question are how can i compute the value from default value if the user put a value in textbox ones user click the submit button and check the checkbox. help me guys please .. Thank you :)
- <!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>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <style type="text/css">
- .table_cls {
- width:100%;
- }
-
- .tr_cls {
- width:20%;
- align:center;
- }
-
- .td_cls{
- width:20%;
- align:center;
- }
-
- </style>
- <title>Tables</title>
- </head>
- <body>
-
- <table class="table_cls" border="1";>
- <thead>
- <tr class="tr_cls">
- <td class="td_cls">Checkbox</td>
- <td class="td_cls">Value</td>
- <td class="td_cls">Textbox</td>
- <td class="td_cls">Operators</td>
- <td class="td_cls">Button</td>
- </tr>
- </thead>
-
- <tbody>
- <tr class="tr_cls">
- <td class="td_cls"><input type="checkbox"/></td>
- <td class="td_cls">5</td>
- <td class="td_cls"><input type="text" /></td>
- <td class="td_cls"><select>
- <option>+</option>
- <option>-</option>
- <option>/</option>
- <option>*</option>
- </select></td>
- <td class="td_cls"><input type="button" value="Submit" /></td>
- </tr>
-
- <tr class="tr_cls">
- <td class="td_cls"><input type="checkbox"/></td>
- <td class="td_cls">4</td>
- <td class="td_cls"><input type="text" /></td>
- <td class="td_cls"><select>
- <option>+</option>
- <option>-</option>
- <option>/</option>
- <option>*</option>
- </select></td>
- <td class="td_cls"><input type="button" value="Submit" /></td>
- </tr>
-
- <tr class="tr_cls">
- <td class="td_cls"><input type="checkbox"/></td>
- <td class="td_cls">6</td>
- <td class="td_cls"><input type="text" /></td>
- <td class="td_cls"><select>
- <option>+</option>
- <option>-</option>
- <option>/</option>
- <option>*</option>
- </select></td>
- <td class="td_cls"><input type="button" value="Submit" /></td>
- </tr>
-
- <tr class="tr_cls">
- <td class="td_cls"><input type="checkbox"/></td>
- <td class="td_cls">8</td>
- <td class="td_cls"><input type="text" /></td>
- <td class="td_cls"><select>
- <option>+</option>
- <option>-</option>
- <option>/</option>
- <option>*</option>
- </select></td>
- <td class="td_cls"><input type="button" value="Submit" /></td>
- </tr>
- <tbody>
- </table>
- </body>
- </html>