JSFiddle - React, Tailwind, and code Playground

HTML

<div></div>

JavaScript

$('div').html('<input type="text"><input type="text"><button id="btn">Кнопка</button>');

$('#btn').click(function() {
    $('div input').each(function() {
        alert( $(this).val() );
    });
});