libpro Posted November 22, 2014 Share Posted November 22, 2014 Hello every one, I want to select a image and preview an image before I click button Upload, I can do it and it done but I want to have a event cancle select this file by click on <a></a> or click on button, it may be look like post status with attach image in facebook, so I don't known how to make it, I will try use button reset but it don't accordance with required. I hope to recieve some advice or guide to make it, thank for read. <html><head><title>Untitled Document</title></head><body><label for="avatar">Select Image:</label><input id="avatar" name="avatar" type="file"><a href="">Click to cancle Select</a> or<input type="button" value="Click to cancle Select" /></button></body></html> Here is picture demo: Link to comment Share on other sites More sharing options...
justsomeguy Posted November 24, 2014 Share Posted November 24, 2014 Is that all the code you have? What about Javascript code? You'll need to use Javascript to get that field and clear the value. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now