Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

toggle button javascript

<input type="button" id="myButton" value="NO" onclick="Buttontoggle();">

function Buttontoggle()
{
  var t = document.getElementById("myButton");
  if(t.value=="YES"){
      t.value="NO";
  } else if(t.value=="NO"){
      t.value="YES";
  }
}
Source by www.delftstack.com #
 
PREVIOUS NEXT
Tagged: #toggle #button #javascript
ADD COMMENT
Topic
Name
1+4 =