王者之座 2016-08-04 01:11 采纳率: 61.9%
浏览 1331

如何在字符串中加对象

使用easyUI 的表格 其中的返回的 a中onclick事件传的参数要五个,感觉好麻烦 记的以前用bootstrap传过对象回去 这回传rowData的话 alert rowData会出现undefined 在页面调试中也没办法看到值只看到一个object Object

 {
                                    field : 'action',
                                    title : '操作',
                                    width : 100,
                                    align : 'center',
                                    rowspan : 2,
                                    formatter : function(value, rowData,
                                            rowIndex) {
                                        var a = '<a href="javascript:void(0);" id="edit'+rowIndex+'" class="easyui-linkbutton" iconCls="icon-mini-edit" plain="true" onclick="bfupdate('+ rowData.ID+','+rowData.BTS_CHECKSTATUS+')">编辑</a> ';

                                        return a;


                                    }
                                }
  • 写回答

2条回答 默认 最新

  • Moluth 2016-08-04 01:56
    关注

    要想在字符串中加对象,你需要看看json

    评论

报告相同问题?