JSFiddle - React, Tailwind, and code Playground

by Sébastien Lorentz

HTML

<div id="form0">
  <input type="text" class="field1">
</div>
<div id="form1">
  <input type="text" class="field1">
</div>
<div id="form2">
  <input type="text" class="field1">
</div>

JavaScript

console.log([...document.querySelectorAll('div')].forEach(div => {
	// process the div element here with div.id beeing te ID
}));