Well, I need the variable "_som" to return a sum, instead of concatenating
_eb.addEventListener('click',function(){
if (_mon > d.v_eleitor){
var md = _mon - d.v_eleitor;
k.innerHTML="$"+md+",00";
_mon = md;
_jj.innerHTML = d.x_eleitor;
if (_pp == ""){
_pp.setAttribute("value", d.x_eleitor);
} else {
var yy = _pp.getAttribute("value");
var _som = eval("yy + 15");
alert(_som);
_pp.setAttribute("value", _som);
}
} else {
alert(d._eleitor);
}
});
I need it to return the sum in the "value" attribute of this progress bar:
<progress id="progress_bar" value="" max="1000">