FileBox

easyui的filebox过滤文件

拈花ヽ惹草 提交于 2020-04-27 22:23:02
示例:<input class="easyui-filebox" data-options="buttonText:'选择文件',accept:'image/gif' "/> 这样设置过后,选择文件的时候只有后缀为*.gif 的文件才会显示。 类型 accept填写的值 描述 *.3gpp audio/3gpp, video/3gpp 3GPP Audio/Video *.ac3 audio/ac3 AC3 Audio *.asf allpication/vnd.ms-asf Advanced Streaming Format *.au audio/basic AU Audio *.css text/css Cascading Style Sheets *.csv text/csv Comma Separated Values *.doc application/msword MS Word Document *.dot application/msword MS Word Template *.dtd application/xml-dtd Document Type Definition *.dwg image/vnd.dwg AutoCAD Drawing Database *.dxf image/vnd.dxf AutoCAD Drawing Interchange

jquery多文件上传,上传前可回显,多次添加,删除

浪尽此生 提交于 2020-04-05 19:48:48
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>多文件上传及回显</title> <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script> <style> .file-box { position: relative; display: inline-block; width: 100px; height: 100px; background: url('添加相册.png')no-repeat; background-size: 100px 100px; } .choose-file { width: 100%; height: 100%; opacity: 0; filter: alpha(opacity=0) } .file-item { width: 100px; height: 100px; float: left; margin-left: 10px; } .file-item div { width: 100px; height: 100px; vertical-align: middle; position: relative; } .file-item div img { width: 100px;