我正在選擇和拒絕給學生添加班級。現在我想提交表格,我想發送所有擁有select-student
類別的學生。這是我的動力學生代碼:如何序列化(選擇學生)班級條件的學生
<form id="overideCommentForm" >
<?php while($skillData = $skillQuery->fetch_assoc()) { ?>
<td><span id="stu1" class="reject-student ">Not Selected</span></td>
<td><span id="stu2" class="select-student ">Selected</span></td>
<td><span id="stu5" class="select-student ">Selected</span></td>
<td><span id="stu8" class="reject-student ">Not Selected</span></td>
<td><span id="stu9" class="select-student ">Selected</span></td>
<?php } ?>
</form>
<button id="gdFinal">Submit</button>
$("#gdFinal").click(function(){
var jobID = 50;
$.ajax({
url: "gdcontroller.php",
method: "POST",
data: {
overideData : $("#overideCommentForm").serialize(),
'action': 'overrideStudent',
'JobID': +jobID
},
dataType: "json",
success: function (response) {
這不是夾板你在做什麼試圖在這裏實現。你想在AJAX請求中發送什麼數據?我假設'.select-student'元素的'id',是否正確? –
是的確切她想發送學生'ID'誰擁有'選擇學生'類@RoryMcCrossan –
是的,我想發送'學生ID'who有'選擇學生' –