Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

http form

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);
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #http #form
ADD COMMENT
Topic
Name
8+2 =