2
I’m trying to add more "1" with parseint() to the number but it always returns me the original number with "1" next to it, for example 10 + 1 it returns me 101 (hit mizeravi). Note: I am using the split because in my full function I return to several different div’s different values.
function teste(conteudo) {
dados = conteudo.split('|');
var adicicaoEstoque = parseInt(dados[1] + 1);
document.getElementById(dados[0]).innerHTML = adicicaoEstoque;
}
<button onclick="teste('resultado|10')">adicione + 1</button>
<div id="resultado"></div>