Well, I have the following javascript code and when I try to sum the strMessage
it does not add, but it adds side by side to the value and so on every time it executes, what am I doing wrong? p>
function main() {
var s = 0;
//Espera um segundo
setInterval(function() {
$.ajax({
url: 'teste3.php',
success: function(strMessage) {
s += strMessage;
},
});
document.write(s);
}, 1000);
}
window.onload = main;