在admui中怎样上传本地文件?
Posted zhang-jiao
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了在admui中怎样上传本地文件?相关的知识,希望对你有一定的参考价值。
1.首先需要引入一些插件
css:
<link rel="stylesheet" href="/vendor/blueimp-file-upload/jquery.fileupload.css">
js:
<script src="/vendor/blueimp-file-upload/jquery.fileupload.js" data-name="fileupload" data-deps="jquery-ui"></script>
<script src="/vendor/blueimp-file-upload/jquery.fileupload-process.js" data-name="fileupload-process" data-deps="fileupload"></script>
<script src="/vendor/blueimp-file-upload/jquery.fileupload-image.js" data-deps="fileupload,fileupload-process"></script>
<script src="/vendor/blueimp-file-upload/jquery.fileupload-audio.js" data-deps="fileupload"></script>
<script src="/vendor/blueimp-file-upload/jquery.fileupload-video.js" data-deps="fileupload"></script>
<script src="/vendor/blueimp-file-upload/jquery.fileupload-validate.js" data-deps="fileupload"></script>
<script src="/vendor/blueimp-file-upload/jquery.fileupload-ui.js" data-deps="fileupload"></script>
<script src="/vendor/dropify/dropify.min.js"></script>
<script src="/js/examples/forms/dropify.js" data-deps="fileupload"></script>
<script src="/vendor/twbs-pagination/jquery.twbsPagination.min.js"></script>
2.html:
<input type="file" class="form-control" id="input-pic-now" onchange="ImgUpload4()" multiple="multiple" accept="image/*" style="display:none;" /> <a href="javascript:;" type="button" role="menuitem" class="btn btn-cropper ladda-button" onclick="$(this).prev().click()">上传附件</a>
以上是关于在admui中怎样上传本地文件?的主要内容,如果未能解决你的问题,请参考以下文章