Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

form append other data feild and send through ajax

var data = new FormData();
data.append('name', 'Bob'); 

function sendData() {
    $.ajax({
        url: '/helloworld',
        type: 'POST',
        contentType: false,
        data: data,
        dataType: 'json'
    });
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #form #append #data #feild #send #ajax
ADD COMMENT
Topic
Name
3+8 =