JSFiddle - React, Tailwind, and code Playground
by ciaoben
HTML
<div class="form">
<input value="1">
<input value="2">
<input value="3">
<input value="4">
<input value="5">
<input value="6">
</div>
<button id="c"> prova </button>
JavaScript
$('#c').on('click',function() {
// get all the inputs into an array.
var $inputs = $('.form :input');
// not sure if you wanted this, but I thought I'd add it.
// get an associative array of just the values.
var values = {};
$inputs.each(function() {
values[0] = $(this).val();
});
$('.form').html(values[0]);
});