How to upload image in html form | CodeTextPro - CodeTextPro | Web Tutorial | Technology Provides - Web design, Technology gyan, Digital marketing, Online earnings, Seo, Adsense, Technology news, Motivation and inspiration, Latest Technology Affairs, Gadgets, Blogging

Friday, January 11, 2019

How to upload image in html form | CodeTextPro

In this program, you will learn how to upload an image in your HTML form and you can see the image that you upload.


<script type="text/javascript" src=""></script>
<script type="text/javascript">
$(function () {
function imageIsLoaded(e) {
<input type="reset" value="Cancel">

<body bgcolor="yellow">
<center><h1>Submit Your Query</h1>
Name:<input type="text" name="usrname">
<textarea rows="4" cols="50">
Enter text here...</textarea><br><br>
<input type='file' />
<img id="myImg" src="#" alt="
Your Image" width="200" height="150" />

    $(":file").change(function () {
        if (this.files && this.files[0]) {
            var reader = new FileReader();
            reader.onload = imageIsLoaded;

<input type="submit" value="Submit">


No comments:

Post a Comment