小编Reg*_*ias的帖子

Jquery无法附加到包含HTML作为内容的有序列表中

我试图根据从服务器收到的JSON响应附加到有序列表.响应包含HTML标记,由于某种原因它们没有在HTML中呈现.我为响应消息做了一个console.log,看起来没问题.但是,当我将其添加到我的列表时,它不会显示在屏幕上.

我在后端使用jquery和PHP/Mysql进行ajax调用.

这是jquery代码片段:

 success: function (response) {
                    var responsedata = jQuery.parseJSON(response);
                    console.log(responsedata.msg);
                    $('#step3ul2').append("<li>"+responsedata.msg+"</li>");
                    $("#finalmsgsuccessdiv").show();    
                    },
Run Code Online (Sandbox Code Playgroud)

console.log打印:

<a href = '../editrequest/index.php?q=88>Request id 88</a> was successfully added in the system
Run Code Online (Sandbox Code Playgroud)

但浏览器什么都没显示.

html php mysql ajax jquery

0
推荐指数
1
解决办法
143
查看次数

标签 统计

ajax ×1

html ×1

jquery ×1

mysql ×1

php ×1