博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Weui 文件上传完整版示例
阅读量:7238 次
发布时间:2019-06-29

本文共 2823 字,大约阅读时间需要 9 分钟。

部分思路借用网友,部分是自己细化的. 先声明.

 

不多说,参考代码

@{    ViewBag.Title = "费用填报";    Layout = "~/Views/Shared/_MForm.cshtml";}    
费用填报
备注

附件上传:

0/2

 

          //$.ajax({});
};                reader.readAsDataURL(file);            }        });        var index; //第几张图片        $uploaderFiles.on("click", "li", function () {            index = $(this).index();            $galleryImg.attr("style", this.getAttribute("style"));            $gallery.fadeIn(100);        });        $gallery.on("click", function () {            $gallery.fadeOut(100);        });        //删除图片        $(".weui-gallery__del").click(function () {            $uploaderFiles.find("li").eq(index).remove();            var num = $('.weui-uploader__file').length;            $('#uploadCount').text(num);        });        $("#btnsaveCharge").click(function () {                        //或者在这里实现批量上传, 不建议批量上传        });    });  //生成guid    function genGUID() {        var G1 = (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1) + (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);        var G2 = (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1) + (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);        return (G1 + G2);    }  

//引入示例

    
@RenderBody()

 

 

 

转载于:https://www.cnblogs.com/benbenfishfish/p/9556018.html

你可能感兴趣的文章
抓取某一个网站整站的记录
查看>>
Android依赖管理与私服搭建
查看>>
常用正则表达式大全!(例如:匹配中文、匹配html)
查看>>
结合抓包工具深入分析slb、vpc网络配置ftp服务
查看>>
关于db link权限分配的苦旅(二)
查看>>
CentOS7下如何查看vsftpd服务的状态
查看>>
阿里云Redis华北5 (呼和浩特)开放售卖
查看>>
SAP后台配置中“公司”与“公司代码”概念的不同
查看>>
JSP application对象
查看>>
使用消息系统进行微服务间通讯时,如何保证数据一致性
查看>>
MailTest
查看>>
索引键的唯一性(4/4):非唯一聚集索引上的唯一和非唯一非聚集索引
查看>>
Java---俄罗斯方块小游戏
查看>>
spring boot 调试 - 热部署
查看>>
Python installation
查看>>
C# 带用户密码访问网络共享
查看>>
Win10之UWP的数据存储
查看>>
程序员最常用的5大编程实战网站
查看>>
管理数据中心需要瞻前顾后
查看>>
Ubuntu 搜狗输入法 双拼输入法
查看>>