I have a jquery ajax code that returns me data from a request, but it returns me a line and then erases and plays the next one on top of the previous one, I want it to print on the screen 1 result below another as a list, how can I do this?
<html>
<head>
<title> chk </title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script><script>functionenviar(){varbin=$("#bin_id").val();
var linhaenviar = bin.split("\n");
var index = 0;
linhaenviar.forEach(function(value){
setTimeout(
function(){
$.ajax({
url: 'envio.php',
type: 'POST',
dataType: 'html',
data: "bin=" + value,
success: function(resultado){
$('#oi').html(resultado + "<br>");
}
})
}, 10 * index);
index = index + 1;
})
}
</script>
</head>
<body>
<center>
<textarea name="bin" id="bin_id" rows="10" cols="40">
</textarea>
<br>
<input type="button" value="testar" onclick="enviar();"></input>
<br>
<div id="oi" name="oi">
<p></p>
</div>
</center>
</body>
</html>