
<html> <head> <title>增删改查</title> <style type=""> tr{ text-align:center }</style> <script type="text/javascript"> //通过新增按钮来控制表格的显示与隐藏 var optionFlag = "save" var updateRowIndex = -1 var checkFlag=false//默认为不显示 function show() { optionFlag = "save"var f = document.getElementById("did")//获得id为did的 div if(!checkFlag) {
1、首先打开elementui软件,打开新建表格。2、其次点击函数,手动添加手动添加一个el-table-column,设type属性为selection。
3、最后点击完成添加即可。
标签:js代码 .com 效果 click .text jquer 参考 定义 html项目中需要d出层效果,使用了layui前端框架,主要使用了里面的d出层特效(可以移动)
html代码
要给这个标签绑定click方法
1 <a href=‘javascript:‘ data-method=‘offset‘ data-type=‘auto‘ class=‘showMean‘>显示</a>
点击以后,显示这个页面
1 <div class="con-no-ma displayNo" id="con-no-ma">
2显示页面
3 </div>
js代码
function showMean() {
layui.use(‘layer‘,function () {
var $ = layui.jquery, layer = layui.layer
//触发事件,这个相当于设置参数
var active = {
offset: function(othis){
var type = othis.data(‘type‘)
,text = othis.text()
layer.open({
title:"数据关联",
type: 1,
offset: type, //具体配置参考:http://www.layui.com/doc/modules/layer.html#offset
id: ‘LAY_demo‘+type, //防止重复d出
content: $("#con-no-ma"), //在页面新定义,然后通过id绑定到这
btn: ‘关闭全部‘,
area: [‘1000px‘, ‘500px‘],
btnAlign: ‘c‘, //按钮居中
shade: 0, //不显示遮罩
//btn的方法
yes: function(){
layer.closeAll()
},
//右上角关闭按钮的方法
cancel: function(){
layer.closeAll()
}
})
}
}
//给指定标签绑定click事件
$(‘ .showMean‘).on(‘click‘, function(){
var othis = $(this), method = othis.data(‘method‘)
active[method] ? active[method].call(this, othis) : ‘‘
})
})
}
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)