I want to change the value written in 55 inputs
that have the same class called input_valores_provisionales
and different id (1,2,3,4 ...) in a function as soon as the page is loaded
here the script
$(document).ready(function()
{
alert("alert para comprobar que la función se ejecuta"); // aqui OK
$('.input_valores_provisionales').val("0"); // no funciona
});
I tried the following ways and it does not work either
$('.input_valores_provisionales > input').val("0");
$(".input_valores_provisionales").text("0");
document.getElementsByClassName("input_valores_provisionales").value="0";
notwithstanding this form if it works, and once I check that the class is well written, otherwise this would not be effective
$(".input_valores_provisionales").attr("placeholder","0");
but it does not help me because the zero does not take it as a numerical value, it is rather a 'phantom zero' that is displayed there and disappears when putting the cursor over the input, according to this the problem for me is not in that the jquery does not do its respective function if it does not seem that the input was "blocked" to write in the jquery or javascript, with the keyboard I can write normally
I tried to put the attribute value="0" to each of the 55 inputs and it did not work either
I tried to remove it and add the attribute type="text" and neither
Any idea what it can be?