The following line:
<a id="asociar-1500" style='color: #004881' href="#" title='Asociar al Proveedor' class="btn btn-danger"><input type="hidden" value = "true"></>
It generates the following HTML:
<a id="aosciar" class="btn btn-danger" title="Asociar al Proveedor" href="#" style="color: #004881">
<input type="hidden" value="true">
</a>
I would like to know how to get the Value of the Input that is in Hidden , for that I am testing with this jquery function:
$('a[id^=asociar-]').click(function (e) {
e.preventDefault();
var inputs = (this).getElementsByTagName('input');
console.log(inputs[0]);
var asociado = inputs[0].attr('value');
console.log(asociado);
});
But I have not managed to enter the input.