- 任何元素都可以作为上传组件来调用,譬如按钮、图片、普通的 DIV 等等
一、上传
- 模块加载名称:upload
<button type="button" class="layui-btn" id="test1">
<i class="layui-icon"></i>上传图片
</button>
<script>
layui.use("upload", function () {
var upload = layui.upload;
upload.render({
elem: "#test1",
});
});
</script>