Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

file upload in jquery

$(function(){
    $('#uploadBTN').on('click', function(){ 
        var fd = new FormData($("#fileinfo"));
        //fd.append("CustomField", "This is some extra data");
        $.ajax({
            url: 'upload.php',  
            type: 'POST',
            data: fd,
            success:function(data){
                $('#output').html(data);
            },
            cache: false,
            contentType: false,
            processData: false
        });
    });
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: poo js 
Javascript :: javascript get element using id and class name 
Javascript :: modal.hide not working 
Javascript :: change class Name in react 
Javascript :: This version of CLI is only compatible with Angular versions 
Javascript :: json data 
Javascript :: javascript element height 
Javascript :: string to currency javascript 
Javascript :: check if object has method javascript 
Javascript :: render markdown in nextjs 
Javascript :: create javascript array 
Javascript :: array.unshift in javascript 
Javascript :: dayjs now 
Javascript :: javascript join array 
Javascript :: javascript get child element by parent id 
Javascript :: js how to find element using id 
Javascript :: javascript calculator 
Javascript :: tolocalestring javascript currency fixing 2 decimal places 
Javascript :: how to count specific letters in string js 
Javascript :: node.js util module 
Javascript :: classiceditor is not defined using npm 
Javascript :: node.js express 
Javascript :: jquery convert time to 1day 2 minutes 4 seconds 
Javascript :: string indexing in js 
Javascript :: react native modal close when click outside 
Javascript :: this setstate previous state react 
Javascript :: create react app command 
Javascript :: node filesystem change directory of a file 
Javascript :: how to sort an array of object 
Javascript :: javascript html append 
ADD CONTENT
Topic
Content
Source link
Name
8+3 =