Jquery - Json - ToolTip 返回对象对象

问题描述

tippy('.message,{
    theme: 'css',placement: 'left',content:getListMessage
    });
                
function getListMessage() {
var json = data.messageId; 
var array = json.split(" "); 
var title = "<h1>" +  array[0] + "</h1>" + "<br>" + array[1] + "<br>" + "<h4>" + array[2] + "</h4>"; 
return title ;
}

大家好, 我在代码显示了以下问题,实际上它不会通过随意将文本格式转换为 HTML 来将连接的结果返回给我。 在内容中,我注意到工具提示仍然没有格式化我 在内容中只给我 [object object] 正如您从 JSON 中的代码中看到的,我将其转换为一个数组,以便我可以为每个元素插入标签

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)