How Set value in editable grid by javascript?

Hi ,

I write script

function nrofila() {
var fila = $(‘#tabla_a’).find(‘tbody > tr’).length-1;
$($(‘#tabla_a’).find(‘tbody > tr’)[fila]).children(‘td’)[0].innerHTML = fila+“”;
}
document.getElementsByClassName(‘bonita_form_grid_add_button’)[0].addEventListener(‘click’, nrofila, false);

but, the value is lost… Help me…

How Set value in editable grid by javascript?