jQuery("#grid_id").jqGrid({ ... colModel: [ ... {name:'price', index:'price', width:60, align:"center", editable: true, formatter:imageFormat, unformat:imageUnFormat}, ... ] ... }); function imageFormat( cellvalue, options, rowObject ){ return '</pre> <img src="'+cellvalue+'" alt="" /> <pre>'; } function imageUnFormat( cellvalue, options, cell){ return $('img', cell).attr('src'); }
jqgrid
最新推荐文章于 2021-05-19 10:37:23 发布