有时候我们需要在添加按钮后追加弹窗,并且想要选择的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);
捕捉模式从DOM最顶层一直到最后一层,冒泡正好相反,具体运行以下实例测试.<!DOCTYPE html> <html> <head> <title>捕捉和冒泡</title> <meta charset="...
<form action="save.php" method="post" target="nm_iframe"> &nbs...
<!-- 三个核心方法 openDatabase:这个方法使用现有数据库或创建...
<!doctype html> <html> <head> <meta charset="utf-8"> <title>无标题文档</title> </head> ...
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>录制</title> <script ...
在es5的时候变量只能通过+号拼接,es6种允许将变量放在大括号之中。有点类似php和c#对字符串的操作。 <script type="text/javascript"> &n...