比方說,我有這樣的形式和腳本:如何獲得提交按鈕POST數據,而由JavaScript form.submit提交()
<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請求?
讓你的,這樣的onclick將工作 – Treby 2009-11-18 10:07:18
它的工作原理反正..我選擇提交按鈕所以它會禁用JavaScript – 2009-11-18 15:25:27