JSFiddle - React, Tailwind, and code Playground

by tayhaithian

HTML

Name 1:<input type="text" class="one" id="mytext">

<button onclick="disfunction()">Disable</button>

JavaScript

function disfunction(){
    document.getElementsByClassName("one")[0].disabled = true;
}