Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

jquery empty file input

//Clear file input with jQuery
$("#fileInputId").val(null);

//Clear file input with JavaScript
document.getElementById("fileInputId").value = null
Comment

How to check if input file is empty in jQuery

if ($('#videoUploadFile').get(0).files.length === 0) {
    console.log("No files selected.");
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript format number as currency 
Javascript :: javascript remove from array by index 
Javascript :: how to call await outside async function in js 
Javascript :: npm font awesome vue 
Javascript :: jest reset spy 
Javascript :: javascript sort array of objects by date 
Javascript :: concurrently node react 
Javascript :: javascript factorial 
Javascript :: check type string javascript 
Javascript :: window.location.href target blank 
Javascript :: javascript change color for class name 
Javascript :: mongoose timestamps 
Javascript :: foreach nodejs 
Javascript :: json nuget package manager 
Javascript :: protractor window size 
Javascript :: jquery scroll to id 
Javascript :: package.json: License should be a valid SPDX license expression 
Javascript :: reference body js 
Javascript :: dom key event shift is pressed 
Javascript :: sanitise string js 
Javascript :: reactjs variable in string 
Javascript :: jquery get first character of string 
Javascript :: create stack navigator has been moved to react-navigation-stack 
Javascript :: Check if a JavaScript string is a URL 
Javascript :: disable default sorting in datatable 
Javascript :: js add string to beginning of string 
Javascript :: javascript loop through array 
Javascript :: capturar el valor de un input con jquery 
Javascript :: nodejs to exe 
Javascript :: jquery each data 
ADD CONTENT
Topic
Content
Source link
Name
7+9 =