get element is disabled or not js code example Example: js set disabled document.getElementById("myBtn").disabled = true;