有时候我们需要在添加按钮后追加弹窗,并且想要选择的ids进行传参,可以通过以下方式获取
// 监听导入题库事件
$('.btn-add-question').click(function (){
var selectIds = Table.api.selectedids(table);
var url = 'course/importQuestion/ids/'+selectIds.join(',');
Fast.api.open(url, $(this).data("original-title") || $(this).attr("title") || __('导入题目'), $(this).data() || {}, {
success: function () {
$(".btn-refresh").trigger("click");
}
});
});重点是Table.api.selectedids(table);
https://3gimg.qq.com/lightmap/v1/marker/index.html?marker=coord:37.6767600000,112.7297800000&key=TKUBZ-D24AF-GJ4JY-JDVM2-IBYKK-KEBCU&referer=p...
工厂模式虽然解决了创建多个对象的问题,但是并没有解决识别对象从属的问题.因为都属于object.因此出现了构造函数//构造函数名称首字母大写是规范 function Box(name,age){ this.name=name; this.age=age; this.run=funct...
rem原理和简介(1).字体单位单位的值是根据html根元素大小而定,同样可以作为宽度高度单位(2).适配原理将px替换为rem,动态修改html的font-size适配(3).单位1rem=16px,why? F12中1rem在computed中font-size属性中会显示为font-size:...
ES5中编写函数,为了给参数默认值,必须在函数体内对参数判断,着实揪心。ES6好多了。<script type="text/javascript"> function run(width = 100, height&...
js生成二维码(1).下载二维码类库https://github.com/davidshimjs/qrcodejs(2).引入类库<script type="text/javascript" src="//static.runoob.com/a...
只需要每个选择器之间用,隔开.class_a , .class_b{ text-decoration: none; color: #474747; }这东西都能忘记...