【发布时间】:2017-03-13 05:01:37
【问题描述】:
我正在尝试为每个图像带来引导模式权限。我怎样才能把它带入我当前的代码中。检查我的小提琴
http://jsfiddle.net/BrianDillingham/q9Lx1Lss/
$images = $('.imageOutput')
$(".imageUpload").change(function(event){
readURL(this);
});
function readURL(input) {
if (input.files && input.files[0]) {
$.each(input.files, function() {
var reader = new FileReader();
reader.onload = function (e) {
$images.append('<img src="'+ e.target.result+'" />')
}
reader.readAsDataURL(this);
});
}
}
【问题讨论】:
-
您已经在预览图像了。但是您希望它在
bootstrap模态容器中预览。是你要找的吗? -
是的,你是对的
标签: jquery html css twitter-bootstrap bootstrap-modal