JSFiddle - React, Tailwind, and code Playground

by techiedelight

HTML

<div id="container">
  <label>Enter your name: <input type="text"></label>
  <button id="submit">Submit</button>
</div>

JavaScript

var childNodes = document.getElementById("container").getElementsByTagName('*');
for (var node of childNodes) {
  node.disabled = true;
}