Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

jquery get form data

$('form').serializeArray()
// gives 
// 	[ {"name":"foo","value":"1"},
//  {"name":"bar","value":"xxx"},
//  {"name":"this","value":"hi"} ]


// or 

$('form').serialize() // gives : "foo=1&bar=xxx&this=hi"
Comment

jquery form data

var fd = new FormData();    
fd.append( 'file', input.files[0] );

$.ajax({
  url: 'http://example.com/script.php',
  data: fd,
  processData: false,
  contentType: false,
  type: 'POST',
  success: function(data){
    alert(data);
  }
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript median of array 
Javascript :: jquery if class exists 
Javascript :: regex to get items between quotes 
Javascript :: gdscript yield timer 
Javascript :: javascript key exists 
Javascript :: node js quit 
Javascript :: Get First Day and last day of week javascript 
Javascript :: required false jquery 
Javascript :: moment today date 
Javascript :: remove curly brackets from stringify javascript 
Javascript :: email validation using javascript 
Javascript :: datatables change width of columns 
Javascript :: javascript remove last characters from string 
Javascript :: jquery continue in loop each 
Javascript :: jquery datatable destroy and recreate 
Javascript :: regex validate money 
Javascript :: window viewport size javascript 
Javascript :: jquery smooth scrool 
Javascript :: NullInjectorError: No provider for HttpClient! 
Javascript :: get id in jquery 
Javascript :: download canvas as image 
Javascript :: how to open browser for upload with click on element in jquery 
Javascript :: react scroll to bottom of div 
Javascript :: javascript base64 encode 
Javascript :: vimeo regez video id 
Javascript :: random password javascript 
Javascript :: skip mongoose 
Javascript :: jquery get each row in table 
Javascript :: how to wait foreach javascript 
Javascript :: set port nextjs 
ADD CONTENT
Topic
Content
Source link
Name
7+7 =