您的位置:首页 > 产品设计 > UI/UE

EasyUI datagrid 列包含超链接以及鼠标经过提示单元格内容

2015-04-16 16:31 375 查看
/**数据绑定加载**/
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>";
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: