#basket
New messages Members Forum rules Search RSS
  • Page 1 of 1
  • 1
Javascript Background Changer
SirDarknight(Tonmoy)Date: Tuesday, 03.05.2011, 06:08 | Message # 1
Group: Verified
Posts: 167
Awards: 6
Status: Offline
Code

<form>

<input type="button"
  value="White"
  onClick="document.bgColor = '#FFFFFF';">

<input type="button"
  value="Green"
  onClick="document.bgColor = '#008000';">

<input type="button"
  value="Blue"
  onClick="document.bgColor = '#0000FF';">

<input type="button"
  value="Red"
  onClick="document.bgColor = '#FF0000';">

</form>

============================================
Change Color with Buttons
Version II -- Background & Font Colors...
============================================

<form>

<input type="button"
  value="White"
  onClick="document.bgColor = '#FFFFFF';document.fgColor='#FF0000';">
   
<input type="button"
  value="Green"
  onClick="document.bgColor = '#008000';document.fgColor='#FFFF00';">
   
<input type="button"
  value="Blue"
  onClick="document.bgColor = '#0000FF';document.fgColor='#FFFFFF';">
   
<input type="button"
  value="Red"
  onClick="document.bgColor = '#FF0000';document.fgColor='#FFFF00';">

</form>


Please Give Me A Reputation or Award If My Post Helps You
 
  • Page 1 of 1
  • 1
Search: