JSFiddle - React, Tailwind, and code Playground

by Oleh Kotsubko

HTML

<button class="add">Добавить текстовое поле</button>
<div class="form"></div>

JavaScript

$('.add').on('click', function(){
  var a = prompt('ID', 1);
  var b = prompt('value', 1);
  var customInput = $('<input/>',{
	type: 'text',
  id: a,
  value: b
});
	$('.form').append(customInput);
  
});