EasyUI datagrid 列包含超連結以及滑鼠經過提示單元格內容
阿新 • • 發佈:2019-02-17
重要的點 在於/**資料繫結載入**/ function Lodedata() { $('#datagrid').datagrid( { url: 'Code/Default.ashx?methods=test', //資料載入路徑 pagination: true, //是否顯示分頁控制元件 pageSize: 10, //分頁大小 pageList: [10, 20, 30, 40, 50], //每頁的個數 fitColumns: true, //自適應寬度 singleSelect: true, //單選 nowrap: true,//資料長度超出列寬時將會自動擷取。 columns: [ [ { field:'itemid', title: '名稱', align: 'center', width: 200, //value 當前列值 row 當前行 index 當前行數 formatter: function (value, row, index) { return "<a href='#' class='easyui-tooltip' onclick='alter1("+value+")' title=這是一個測試的效果" + value + ">" + value + "</a>"; } ] ] }); }
"<a href='#' class='easyui-tooltip' onclick='alter1("+value+")' title=這是一個測試的效果" + value + ">" + value + "</a>";