开发者

Unable to output formatted HTML from Jquery with html DataType

I am calling some data which has pre-formatted HTML code in it, but when it renders from the jquery it appears to ignore my markup. This is my jQuery:

function GetFeed(){
   document.getElementById("marq").innerHTML = '';

   $.ajax({
    type: "POST",
    url: "xmlproxy.ashx",    
    dataType: "html",
    success: function(obj) {        
     开发者_Go百科  $('<span class="tickerItem"></span>').html(obj).appendTo('#marq');
    }
   });
}


Your selector is wrong just do:

$("#marq").append(your_html);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜