기본적으로 테이블이 있고 각 행에는 드롭 창으로 전환하려는 이미지 아이콘이 있습니다. 모든 예제 코드가 도움이 될 것입니다.
작동 예 : http://jsfiddle.net/krystiangw/mb4o7kfc/1/
JS 파일 :
$('td').each(function(e, element){
filepicker.makeDropPane(
element,
{
multiple: true,
dragEnter: function() {
$(element).html("Drop to upload").css({
'backgroundColor': "#E0E0E0",
'border': "1px solid #000"
});
},
dragLeave: function() {
$(element).html("Drop files here").css({
'backgroundColor': "#F6F6F6",
'border': "1px dashed #666"
});
},
onSuccess: function(Blobs) {
$(element).text(JSON.stringify(Blobs));
},
onError: function(type, message) {
$(element).text('('+type+') '+ message);
},
onProgress: function(percentage) {
$(element).text("Uploading ("+percentage+"%)");
}
}
);
});
HTML 파일 :
<table id="myTable" class="table table-bordered">
<tr>
<th>
Drag&drop panel
</th>
</tr>
<tr>
<td>
Drop files here
</td>
</tr>
<tr>
<td>
Or here
</td>
</tr>
<tr>
<td>
Or here
</td>
</tr>
</table>
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다