1
這裏我不想從提交按鈕傳遞參數。任何人都可以幫助我在提示確認消息,因此三個確認提交按鈕,其值爲確認信息
return confirm("Are you sure to Approve/Reject/Delete ?");
我的HTML代碼
<form name="pendingrequest" id="pendingrequest" action="formhandler.php" method="POST" onsubmit="return confirmation(this);">
<table >
<tr>
<td><input type="submit" name="action" value="Approve"></td>
<td><input type="submit" name="action" value="Reject"></td>
<td><input type="submit" name="action" value="Delete"></td>
</tr>
</table>
</form>
例如,如果有人點擊批准,我想這一點:
return confirm("Are you sure to Approve?");
嘗試http://stackoverflow.com/questions/9091001/how-to-show-confirmation-alert-with-three-buttons-yes-no-and-cancel -as-it –
@VinodVT:問題是,在我的表單中我有3個提交按鈕。我需要提示消息,如您希望在我提交批准按鈕時批准,並且「我希望拒絕提交拒絕按鈕時」等等。 – JakeNsmith