JSFiddle - React, Tailwind, and code Playground

by Bruno Augusto

HTML

<input type="text" id="tabelainput" class="setmembros" maxlength="3" name="setmembros"  value="10" disabled>
<input type="text" id="tabelainput" class="outmembros" maxlength="3" name="outmembros"  value="15" disabled>
<input type="text" id="tabelainput" class="novmembros" maxlength="3" name="novmembros"  value="15" disabled>
<input type="text" id="tabelainput" class="dezmembros" maxlength="3" name="dezmembros"  value="12" disabled>

JavaScript

$( document ).ready( function() {

    var sum = 0;
    
    $( 'input[name$=membros]' ).each( function() {
    
        sum += parseInt( $( this ).val() );
    });
    
    alert( sum );
});