-2
My question is simple, suppose I have a button, when I once click on it I want to run a function as you can see below:
function ativar() {
  var btn = document.getElementsByTagName("button");
  btn[0].innerHTML="ativado";
}
function desativar() {
  var btn = document.getElementByTagName("button");
  btn[0].innerHTML="desativado";
}<html>
  <head>
    <title>exemplo</title>
  </head>
  
  <body>
    <button onclick="ativar()">desativado</button>
  </body>
</html>see that the second function is not used, there is the problem, suppose I activated the button, giving a click, ran the function activate(), but I want when I give a new click, it runs the second function disable().
Thanks, it helped me a lot, unfortunately there are people who negative the question without even knowing the context.
– Anderson Leandro