I need to retrieve the array value of the input that the user clicks, these inputs are of dynamic values.
HTML / PHP
<label>
<i class="fa fa-lg fa-times-circle"><input value="<?=$fs_value?>" name="valor" type="button" data-toggle="modal" data-target="#delSession"></i>
</label>
JS
var val = $("input[name=valor]").val();
$.ajax({
url:'delSession.php',
type:'GET',
data:'valor=' + val,
success:function(data){
$('.exibeDelSession').html(data);
}
});
return false;
In case I can not put in the value of the input name="value []" because I can not redeem in the script and using it so it only brings me the first independent value of which input to click.
There will be several inputs with different values, I would like to get it by name or clicked input, something like this.
I'm waiting for you.