gpt4 book ai didi

jquery - 如何在 JTable 列中显示 HyperLink 数据?

转载 作者:行者123 更新时间:2023-11-27 23:49:34 26 4
gpt4 key购买 nike

我想显示从 jtable 接收到的数据的 href。

下面是代码片段。

$('#JarDistHist').jtable({
title: 'Jar Distribution History',
paging: true,
//pageSize: 10,
sorting: true,
defaultSorting: 'Date ASC',
actions: {
listAction: 'StudentActions.php?action=list&DistId=' + cname + '&fitem=' + fitem + '',


deleteAction: 'StudentActions.php?action=delete'
},
fields: {
id: {

key: true,
create: false,
edit: false,
list: false,

},
Date: {
title: ' Date',
type: 'date',
displayFormat: 'dd-mm-y',
width: '40%',
options: '<a href="JarFillingDetail.php?id">'
},

最佳答案

查看此链接:http://blogs.lessthandot.com/index.php/WebDev/ServerProgramming/nancy-and-jtable-formatting-your/

我想这就是你想要的。

添加字段显示

When we configure our fields for jtable we have a display attribute that takes a function and in that function we can do our formatting.

display: function (data) {
return $('<a href="JarFillingDetail.php?id="' + data.Id + '"></a>');
}

关于jquery - 如何在 JTable 列中显示 HyperLink 数据?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28024074/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com