<input onclick="getInvitevalue(__id__, this)" type="button" value="Invite" name="InviteTeacher" class="InviteTeacher" id= "InviteTeacher"/>
<input onclick="getCancelvalue(__id__, InviteTeacher)" type="button" value="Cancel" name="Cancel" class="Cancel" id= "Cancel"/>function getInvitevalue(idValue,invite){var field1 = idValue;
$.ajax({ url: "inviteteacher.php", type: "POST", data: ({name: field1}),}).done(function() {
if(invite.value = 'Invite')
invite.value = 'Pending Request';});}function getCancelvalue(idValue,cancel){var field2 = idValue;
$.ajax({ url: "inviteteacher.php", type: "POST", data: ({name: field2}),}).done(function() {
if(cancel.value = 'Pending Request')
cancel.value = 'Invite';});}
这里的 onclick id 用于显示动态值。参考我的代码并说明我如何在 boonex-Dolphin 中更改它?