Saturday, Apr 8, 2017
Do you want to create your own website but don't know how to do it. Let's take this course from TreeHouse which is one of the best online course website for developers where you can learn everything from the beginning to the end to create your own website and become the master in creating Websites. Click Here To Get 7 Day Free Trial →
To Preview Image Before Upload It Takes Only One Step:-
- Make a HTML file and define markup,scripting and styling
Step 1.Make a HTML file and define markup,scripting and styling
We make a HTML file and save it with a name preview.html
In this step we create a file tag that accepts only images and it calls preview_image() function with the change event as a parameter when user choose image from folder.In preview() function we first create FileReader object to get the file data and then when the reader is loaded we create a function to get the output image and change its source to result and then we use readAsDataURL to preview the image.You may also like jQuery live preview.
Hello, My Name is Mudit Jain. I am a Web Developer, Professional Blogger and Digital Marketer from India. I am the founder of TalkersCode. I started this blog in february 2015 to help web developers & bloggers by providing easy and best tutorials, articles and offers for web developers and bloggers.