bootstrap-table给单元格添加链接

1、html页面

2、js页面

$("#tb_table").bootstrapTable({
					method: 'get', //请求方式
					url: '/order/orderList', //请求数据的URL
					... //中间的其他选择暂时省略
					columns: [{
						field: 'oprate',
						title: '操作',
						width: 100,
						align: 'center',
						valign: 'middle',
						formatter: aFormatter //添加超链接的方法
					}]
				});

添加aFormatter的方法:

function aFormatter(value, row, index) {
				return [
					'链接'
				].join("")
			}



你可能感兴趣的:(js)