-1

I take data with post method now I need to display html into page here is code:

  function(data,status){
         $("#ul1").text(data);


    });

This will show <li></li> tags inside ul like text not like html how can I show data as html?

2 Answers2

1

You use html:

$("#ul1").html(data);
Pablo Santa Cruz
  • 176,835
  • 32
  • 241
  • 292
1

Use jQuery html("") method

For example:

$("#ul1").html(data);
jyrkim
  • 2,849
  • 1
  • 24
  • 33