Jump to content

Stop Displaying HTML As Text


slj90

Recommended Posts

$('input#name-submit').on('click', function() {
var name = $('input#name').val();
if ($.trim(name) != '') {
$.post('play2.php', {name: name}, function(data) {
$('div#name-data').text(data);
});
}
});

data contains html code but when it is displayed it is displayed as text and shows the html, how can I get the html code to function properly?

 

thanks

Link to comment
https://forums.phpfreaks.com/topic/288724-stop-displaying-html-as-text/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.