0
我正在試圖獲取工具提示或帶2000圖像的表格中的單元格的標題。嘗試使用各種東西,但無法獲得任何解決方案。請幫忙。我對列代碼,jqgrid - 單元格的工具提示或標題不能顯示2000+字符
{
name: 'comments',
index: 'comments',
width: 80,
align: 'center',
resizable: true,
sortable: false,
editable: false,
cellattr: function(rowId, val, rawObject) {
return 'title="' + val + '"'
},
formatter: function(cellvalue, options, rowobject) {
if (cellvalue.length <= 0) {
return cellvalue;
} else {
var image = "<img src='/images/comment.png' />";
return image;
}
}
},
二碼試驗,
{
name: 'comments',
index: 'comments',
width: 80,
align: 'center',
resizable: true,
sortable: false,
editable: false,
formatter: function(cellvalue, options, rowobject) {
if (cellvalue.length <= 0) {
return cellvalue;
} else {
var image = "<img src='/images/comment.png' title='Comments:\n" + cellvalue + "'/>";
return image;
}
}
},
上面的代碼時,有2000個字符沒有顯示任何提示。
也試過,
var image = '<figure><img src='/images/comment.png' title='Comments:\n"+cellvalue+"'/></figure>';
這是加載提示很慢。 請幫忙。
謝謝你的答覆。我試過這個,但在我的jqgrid表中這個選項沒有工作:( – maddy