jQuery EasyUI 修改 propertygrid列名
if($.fn.propertygrid){
$.fn.propertygrid.defaults.columns[0][0].title = "<span style="color: #ff0000;">属性名</span>"; // 对应Name
$.fn.propertygrid.defaults.columns[0][1].title = "<span style="color: #ff0000;">属性值</span>"; // 对应Value
}
清空表格:
$('#pg').propertygrid('loadData', { total: 0, rows: [] });
js遍历对象
for(var i in man){
if (man.hasOwnProperty(i)) { //filter,只输出man的私有属性
console.log(i,":",man[i]);
};
}