Я пробовал этот код:
Код: Выделить всё
$(function() {
$(":file").change(function() {
if (this.files && this.files[0]) {
for (var i = 0; i < this.files.length; i++) {
var reader = new FileReader();
reader.onload = imageIsLoaded;
reader.readAsDataURL(this.files[i]);
}
}
});
});
function imageIsLoaded(e) {
$('div[id^=myImg]').append('
[img] + e.target.result + [/img]
');
};
Код: Выделить всё
Геоморфология
этому
Подробнее здесь: https://stackoverflow.com/questions/793 ... t-html-ids
Мобильная версия