JSFiddle - React, Tailwind, and code Playground

by Alexandr Loginov

HTML

<div id="div">
  <input type="text">
  <input type="text">
  <input type="text">
  <button>ok</button>
</div>

JavaScript

var res = [];
$('button').click(function() {
  $('#div').find('input').each(function(i, el) {
    var $el = $(el);
    res.push($el.val();
	});
  console.log(res);
})