Custom File Input Button with File List | JavaScript Tutorial

preview_player
Показать описание
‍🎓 NEW: Earn a professional certificate in web development from Meta Inc. (course links in card below) 👇

This tutorial covers how to create a custom file input button that supports the selection of one or multiple files that, unlike the native file input element, can be styled. Also covered is how to create a file list that displays the name and size of each file selected.

⚡Web development professional certificates from Meta Inc.⚡
Рекомендации по теме
Комментарии
Автор

I was stuck for 2 days while trying to figure out how to integrate an Upload button on my website. Everything on the net was inappropriate for what I wanted. I believed that I could style and adjust with Bootstrap controls, like everything else. I hadn't done any JS in a while so that made it double difficult.

Your example and the way you explained the JS was perfect and easy to follow. After watching your video and studying it and taking it apart, I was able to implement it. Even though my layout was different and some of my control were in a different places, your illustration of the concepts let me make exactly what I wanted in a hour or two.

Thanks.

RaymondBarrettnkonAce
Автор

Sorry, this is off topic and not the best place to ask such questions.
I figured you'd probably know a way to intercept a site's ads in a clean way using JS, my idea is to have a button that toggles the ads on my blog.
Can you please share some of your wisdom in JS.

anasouardini
Автор

Also could be done with ::file-selector-button pseudoclass

santiagobp