I am trying to print the following output onto my html page:
100.101.102.103
Trying 192.168.30.61 ... Open
Warning Notice
This system is restricted solely to company authorized users
But instead i am getting this : '\n100.101.102.103\r\nTrying 100.101.102.103 ... Open\r\n\r\n************* **************************************************************\r\n Warning Notice\r\n\r\nThis system is restricted solely to company authoriz ed users
The JS:
<script>
$(function() {
$('button').click(function() {
$.ajax({
url: '/runCommand_query',
data: $('form').serialize(),
type: 'POST',
success: function(response) {
//alert("hi");
console.log(response);
//$("#opt").html(response);
$("#opt").html(response);
},
error: function(error) {
console.log(error);
$("#opt").val(error);
}
});
});
});
The HTML:
output id="opt" name="opt"
I need a solution to get rid of the "\r" and "\n"