layer.prompt 添加元素和改变间距
笔记
页面中使用元素选择可以获取到弹层的class,
一般,弹层的输入框为
$(".layui-layer-content"),
弹层为
$(".layui-layer-prompt"),
添加元素使用append方法
$(".layui-layer-content").append("
<input type=“text” id= “num” class=“layui-layer-input” placeholder=“请输入用户数量”/>")
改变弹层与父页面顶部间距
$(".layui-layer-prompt").css(“top”,“150px”);
改变弹层与父页面左边间距
$(".layui-layer-prompt").css(“left”,“150px”);
前端不太熟悉,给自己做的笔记。。。。。