Ich bevölke eine Tabelle mit Daten aus der Datenbank. Die Tabellenzeile hat ein Optionsfeld. Mit jQuery prüfen, welches Radio einer Zeile geprüft wird? dann, wie man die Spaltenwerte dieser Reihe liest?Nach jquery, wählen Sie Tabellenzeile mit Optionsfeld Wert
Hier ist der Tabellenpopulationscode.
<table id="wo_table" class="table table-striped responsive-utilities table-hover jambo_table">
<thead>
<tr class="headings">
<th>
<input type="checkbox" id="selectOne" class="flat">
</th>
<th class="column-title">WO Id </th>
<th class="column-title">Create Date </th>
<th class="column-title">Buyer </th>
<th class="column-title">Style </th>
<th class="column-title">Quantity </th>
<th class="column-title">GG </th>
<th class="column-title">Status </th>
<th class="column-title">Remarks </th>
</tr>
</thead>
<tbody>
<?php
$queryString="SELECT * FROM win_work_order";
fetchWOList($queryString);
function fetchWOList($queryString){
include 'ConnectionToDatabase.php';
$result=mysql_query($queryString);
while($test = mysql_fetch_array($result))
{
echo
'<tr class="even pointer">
<td class="a-center ">
<input type="radio" class="flat" name="table_records" value=' .$test['WO_ID']. '></td>
<td class=" ">' .$test['WO_ID']. '</td>
<td class=" ">' .$test['WO_CREATE_DATE']. '</td>
<td class=" ">' .$test['BUYER_NAME']. '</td>
<td class=" ">' .$test['STYLE_NAME']. '</td>
<td class=" ">' .$test['WO_QTY']. '</td>
<td class=" ">' .$test['CURRENCY_QTY_GG']. '</td>
<td class=" ">' .$test['WO_STATUS']. '</td>
<td class=" ">' .$test['WO_REMARKS']. '</td>';
echo "</tr>";
}
mysql_close($conn);
}
?>
</tbody>
</table>
[jQuery Learning Center] (https://learn.jquery.com/) – Andreas
Willkommen bei SO. Bitte lesen Sie [Welche Themen kann ich fragen] (http://stackoverflow.com/help/on-topic) und [Wie man eine gute Frage stellt] (http://stackoverflow.com/help/how-to -ask) Und [die perfekte Frage] (http://codeblog.jonskeet.uk/2010/08/29/writing-the-perfect-question/) Und wie man ein [minimales, vollständiges und überprüfbares Beispiel] erstellt (http://stackoverflow.com/help/mcve) SO ist ** nicht eine kostenlose Codierung oder Code-Konvertierung oder Debugging oder Tutorial oder Bibliothek Finding-Service ** Sie müssen auch zeigen, dass Sie einige Anstrengungen unternommen haben, um zu lösen dein eigenes Problem. – RiggsFolly