colModel :
{name:'picture',align:'center',editable: true,formatter:showPicture,edittype:'file',
editoptions:{enctype:"multipart/form-data"}}
function :
function showPicture(cellvalue){
return "<img src='${pageContext.request.contextPath}/img/" +cellvalue + "' height='100' width='100'/>";
}
本文介绍了一种在表格中展示图片的技术,通过自定义colModel属性和使用特定的函数showPicture,实现了图片在表格中的预览功能。该技术利用了HTML的img标签来插入图片,并通过contextPath获取图片路径。
589

被折叠的 条评论
为什么被折叠?



