1
here is an example: http://jsfiddle.net/LvsYc/9714/
When you select 4 different images, the 4 images are the same when showing on the screen.
HTML:
<form id="form1" runat="server">
<input type='file' id="imgInp" multiple />
<img id="blah" src="#" width="100" />
<img id="blah1" src="#" width="100" />
<img id="blah2" src="#" width="100" />
<img id="blah3" src="#" width="100" />
</form>
JS:
function readURL(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function (e) {
$('#blah').attr('src', e.target.result);
$('#blah1').attr('src', e.target.result);
$('#blah2').attr('src', e.target.result);
$('#blah3').attr('src', e.target.result);
}
reader.readAsDataURL(input.files[0]);
}
}
$("#imgInp").change(function(){
readURL(this);
});
There are many things you can improve there. The first is not to use different Ivs for each image. The other is you have to do a loop loop and pick up image by image. I will analyze your code and respond.
– Mauro Alexandre