Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

max size input file html

$(`input[id='file-input']`).change(function (e)
{
  let file = e.target.files[0];
  if (file.size > 50000)
  {
    alert(`File too big max 50ko`);
    return null;
  }
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: find and filter in javascript 
Javascript :: axios post form data and json 
Javascript :: jquery declare variable 
Javascript :: js how to work with float 2 decimal numbers 
Javascript :: axios default baseurl conditional environment 
Javascript :: lodash remove null from object 
Javascript :: update data firestore 
Javascript :: string concatenation javascript 
Javascript :: javascript indexof with condition 
Javascript :: javascript remove space 
Javascript :: check how many files in a folder js 
Javascript :: execute php 
Javascript :: adjacent elements product javascript 
Javascript :: create an object array in js 
Javascript :: print all days names of a month js javascript 
Javascript :: .net mvc javascript function call link 
Javascript :: next router 
Javascript :: reset form jquery | form reset javascript/jquery 
Javascript :: foreach break js 
Javascript :: mssql node js documentation 
Javascript :: react bootstrap form select 
Javascript :: what is the use of bind method in javascript 
Javascript :: node.js express 
Javascript :: span change jquery 
Javascript :: is function javascript 
Javascript :: empty function after it is run javascript 
Javascript :: string literal javascript 
Javascript :: how to import dotenv in react 
Javascript :: discord.js v13 if dm 
Javascript :: how the filter() function works javascript 
ADD CONTENT
Topic
Content
Source link
Name
8+3 =