How to disable button using javascript.

Hello I am using document.getElementById("Button").disabled = "disable" but am getting error, help me
Ankur Rajput
Asked 24-10-2021
138

Answer (1)
Use follow code in javascript to disable button document.getElementById("submitnewquestion").disabled = true; if you want enable button use document.getElementById("submitnewquestion").disabled = false; Note : button type="submit"
Ankur Rajput
Asked 14-07-2018
45 Likes
Comments
Write comment

Submit your answer