Changing the background color of html buttons forward and backward after clicks - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Button

Description

Changing the background color of html buttons forward and backward after clicks

Demo Code

ResultView the demo in separate window


<html>
 <head></head> 
 <body> 
  <input class="choice" onclick="this.style.background==='red' ? this.style.background = 'blue' : this.style.background = 'red'" style="background:red;" type="submit" value="V" id="0">  
 </body><!--  w  w  w . j ava2  s.  co  m-->
</html>

Related Tutorials