解决bootstraptable只能初始化数据一次的问题
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | <script> $( "#tool1btn" ).click(function () { if ($( "#tool1select_gene" ).val() == "" && $( "#tool1select_disease" ).val() == "" ) { alert( "Please select a dataset or gene name for analysis." ) } else { $.ajax({ type: 'POST' , dataType: 'json' , data: { symbol: $( "#tool1select_gene" ).val(), disease: $( "#tool1select_disease" ).val() }, url: '/cuDB/analysis/differential/result' , success: function (diff_return) { const return_data = JSON.parse(JSON.stringify(diff_return)); $( "#tool1table" ).bootstrapTable( 'destroy' ); {#$( "#tool1table" ).bootstrapTable( 'refresh' ); //亲测重新刷新不可以,只能销毁 #} $( "#tool1table" ).bootstrapTable({ columns: [{ field: 'symbol' , title: 'Symbol' , sortable: true }, { field: 'disease' , title: 'Disease' , sortable: true }, { field: 'log_fc' , title: 'logFC' , sortable: true }, { field: 'p_value' , title: 'p value' , sortable: true }, { field: 'rid' , title: 'More<br>Details' , align: 'center' , {#formatter: detailFormatter,#} }, ], data: return_data, }); }, error: function () { console.log( "出问题咯error" ) } }); } }); </script> |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· 字符编码:从基础到乱码解决
· 提示词工程——AI应用必不可少的技术
2020-09-21 数据结构007_中缀转后缀表达式
2020-09-21 插播一条:ASCII码
2020-09-21 数据结构006_逆波兰计算器分析和实现
2020-09-21 插播一条:常用正则表达式