$(document).on("change","input[type=file]",function () {
for(var i = 0; i < this.files.length; i ++){
var fr = new FileReader();
fr.readAsDataURL(this.files[i]);
fr.onload = function (ev) {
var img = $("<img/>");
img.prop("src",this.result);
$("#showPic").append(img);
}
}
});