Simple - 简!
layui.use(['element','form','jquery','upload','laydate'], function(){
var element = layui.element;
var form = layui.form;
var $ = layui.jquery;
var layer = layui.layer;
var upload = layui.upload;
var laydate = layui.laydate;
// 子菜单静态高亮
$('.s-subheader a').each(function(){
filename=location.href.substr(location.href.lastIndexOf('/')+1);
if ($(this).attr("href") == filename ){
$(this).addClass("active");
}
});
//执行实例
var uploadInst = upload.render({
elem: '#btnlogo' //绑定元素
,url: '/upload/' //上传接口
,done: function(res){
//上传完毕回调
}
,error: function(){
//请求异常回调
}
});
});
一键复制
编辑
Web IDE
原始数据
按行查看
历史