假设我有这个表单和脚本:
<SCRIPT LANGUAGE="JavaScript">
function handleSubmit() {
return false;
}
function Delete(element) {
var is_confirmed = confirm("Delete this record? \n" + title + " " + date);
if (is_confirmed) {
document.getElementById("Novinky").submit();
}
}
</SCRIPT>
<form action="index.php" method="post" id="Novinky" onsubmit="return handleSubmit();">
<input onclick="Delete(this)" value="Smazat" name="delete[12]" type="submit" />
</form>
有办法将提交按钮数据(
delete[] -> Smazat
)添加到POST请求中吗?