我正在开发特定用户的历史开发,我希望用dataTables来完成.但是,我无法找到可以使我的行或特定单元格可点击的方式.我需要为特定行单独点击打开单独的链接.任何帮助,将不胜感激.提前致谢 !!!
编辑::如果我点击一行,我需要该行的所有数据,这不是问题.我能做到.我需要知道的是使用该特定行数据生成$ .ajax()请求.我认为这样做.但是,知道如何在行单击的新选项卡中打开链接会很棒.
$(document).ready(function() {
var dataSet = [
[]
];
$.ajax({
type: 'POST',
url: "webservices/view_patient_medical_history.php",
async: false,
//data: {'log_id': data},
success: function(response) {
dataSet = JSON.parse(response);
}
});
// var dataSet_arr = jQuery.makeArray(dataSet['responseText']);
$('#patient_medical_history').DataTable({
data: dataSet,
columns: [{
title: "Patient ID",
class: "center"
}, {
title: "Current Medications",
class: "center"
}, {
title: "Allergies",
class: "center"
}, {
title: "Diabetes",
class: "center"
}, {
title: "Asthma",
class: "center"
}, {
title: "Arthritis",
class: "center"
}, {
title: "High …Run Code Online (Sandbox Code Playgroud)