$http({
method: 'POST', //or GET
url: URL,
data: $.param({
}),
headers: {
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
},
responseType: "blob"
}).success(function (response) {
//이미지 지정
var urlCreator = window.URL || window.webkitURL;
var imageUrl = urlCreator.createObjectURL(response);
$('.img').attr("src", imageUrl);
}).finally(function () {
});
'FrontEnd > javascript' 카테고리의 다른 글
자바스크립트로 css생성 하기 (0) | 2018.12.12 |
---|