Click here to Skip to main content
15,891,828 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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 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
<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
http://i1095.photobucket.com/albums/i472/OLAKEN91/ji_zps58ebae06.png
Posted

1 solution

You can refer following link to cancel the selected image.

http://jsfiddle.net/jonathansampson/dAQVM/[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900