JQUERY AJAX output going wrong with Alert(json.result)

You can add HTML content to an element in your page with innerHTML

document.querySelector('#content').innerHTML = json.result;