アップロード
$(document).ready(function(){ $("#upload-area").on("dragenter", function(e){ $("#upload-area").css("background", "#EEE"); }); $("#upload-area").on("dragleave", function(e){ $("#upload-area").css("background", "#DDD"); }); $("#upload-area").on("drop", function(e){ document.getElementById("upload-form-fileselect").files = e.originalEvent.dataTransfer.files; $("#upload-form-fileselect").change(); $("#upload-area").css("background", "#DDD"); }); $(document).on("dragover", function(e){ e.preventDefault(); }); $(document).on("drop", function(e){ e.preventDefault(); }); });