Solution 1 :

Your selector is different from the id, that you try to select.
Either try to change the id or try to escape the braces like this #percent\[\]

\ escapes the brackets, so that jQuery know it’s a part of the id and not a part of the selector like button[name=”explanation”], to select all buttons with the name “explanation”.

Problem :

<td>
    <input type="text" id="percent[]" name="percent[]" class="form-control"/>
</td>

How to get value input field like above in Jquery?
I tried like this and jquery trigger event doesn’t work

$('#percent').change(function(e) {
    var percent = $(this).val();
    var quantity = $('#quantity').val();

    alert(quantity);
    $('#quantity_recipe').val(quantity * percent);
});

Comments

Comment posted by Ivan

any reason to use percent like array data ?

Comment posted by Guna Wirawan

cause I use it for dynamic input table

By