“Formulir http” Kode Jawaban

Formulir HTML

<form action="/action.php">
  <label for="fname">First name:</label><br>
  <input type="text" id="fname" value="Mike"><br><br>
  <label for="lname">Last name:</label><br>
  <input type="text" id="lname" value="Walker"><br><br>
  <input type="submit" value="Submit">
</form>
Nextline Software

Formulir HTML Menggunakan HTTP

edit & run code by clicking it<form method="GET" action="example/message.html">
  <p>Name: <input type="text" name="name"></p>
  <p>Message:<br><textarea name="message"></textarea></p>
  <p><button type="submit">Send</button></p>
</form>
Motionless Macaw

Formulir http

var formElement = document.getElementById("myFormElement");
var xhr = new XMLHttpRequest();
xhr.open("POST", "submitform.php");
xhr.send(new FormData(formElement));
Talented Tapir

Formulir http

var formElement = document.getElementById("myFormElement");
formData = new FormData(formElement);
formData.append("serialnumber", serialNumber++);
xhr.send(formData);
Talented Tapir

Formulir http

var formData = new FormData();

formData.append("username", "Groucho");
formData.append("accountnum", 123456);
formData.append("afile", fileInputElement.files[0]);

var xhr = new XMLHttpRequest();
xhr.open("POST", "http://foo.com/submitform.php");
xhr.send(formData);
Talented Tapir

Jawaban yang mirip dengan “Formulir http”

Pertanyaan yang mirip dengan “Formulir http”

Lebih banyak jawaban terkait untuk “Formulir http” di HTML

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya