我有html表單:如何使用Fetch API從表單中檢索和發送數據?
<form action="file.php" method="post">
<input name="formName" type="text" />
<input name="formEmail" type="email" />
<input name="formSubmit" type="submit" value="Submit Me!" />
</form>
因此,如何使用才能獲取API來獲取這些值,並送他們使用AJAX file.php文件?
看看這個頁面在這裏:https://scotch.io/tutorials/how-to-use-the-javascript-fetch-api-以獲取數據 –
@FotisGrigorakis謝謝,但我需要一個確切的例子與形式和PHP。 – tohhy
你可以按照我寫的網站中的步驟進行操作。 ;) –