Téléchargement d'Image avec Aperçu et Supprimer

Ont la followig des questions et ont besoin de réponses sur le script suivant qui vous donnera un Aperçu d'une Photo avant de le télécharger. Le script est à partir de http://jsbin.com/uboqu3/edit#javascript html

1) Le script fonctionne pour Firefox, pas bon pour IE. Comment faire cela fonctionne pour IE?

2) Il n'est pas une méthode pour supprimer la photo. Besoin de quelque chose comme une petite image "X" installé sur l'Aperçu de la Photo, en cliquant sur ce "X" pour supprimer la photo. Quelqu'un peut-il fournir cette solution?

<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script>
function readURL(input) {
    if (input.files && input.files[0]) {
        var reader = new FileReader();

        reader.onload = function (e) {
            $('#img_prev')
            .attr('src', e.target.result)
            .height(200);
        };

        reader.readAsDataURL(input.files[0]);
    }
}
</script>

<meta charset=utf-8 />
<title>JS Bin</title>
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style>
article, aside, figure, footer, header, hgroup,
menu, nav, section { display: block; }
</style>
</head>
<body>
<input type='file' onchange="readURL(this);" />
<img id="img_prev" src="#" alt="your image" />
</body>
</html>
Quelle erreur avez-vous sur IE ?
Ouais, pouvez-vous fournir plus d'information ou post un exemple dans jsfiddle.net

OriginalL'auteur user1315468 | 2012-04-18