twitter-bootstrap - 在 Bootstrap 表中添加链接

标签 twitter-bootstrap bootstrap-table

我想为 bootstrap-table 中的列添加链接.这个怎么做?

最佳答案

在您的 HTML 表格中:

<th data-field="snum" data-formatter="LinkFormatter">Computer</th>

在你的 javascript 中:
function LinkFormatter(value, row, index) {
  return "<a href='"+row.url+"'>"+value+"</a>";
}

关于twitter-bootstrap - 在 Bootstrap 表中添加链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27819208/

相关文章:

jquery - 使用 jquery 附加到 <head> 时不应用 .less 样式,但 .css 有效

jquery - 使用 twitter bootstrap 在小屏幕上垂直重新排序 div

twitter-bootstrap - 如何在 Bootstrap 中选择 960px 宽而不是 1200px 的容器

css - 对齐按钮组

jquery - Bootstrap-table 可编辑扩展和 x-editable 写回 JSON

javascript - Twitter Bootstrap 表格可编辑的 json 数据

twitter-bootstrap - 在启动时隐藏 Bootstrap 表中的列

javascript - 如何在 React-bootstrap 中创建包含多行单元格的表格?

javascript - 滚动 spy 在 bootstrap 4 中没有响应

CSS:相同的高度