Here you can find a number of examples on Java Script.Please find the various kinds of examples listed on the right side of this site. If you don't find anything on Java Script then please write to us or leave a commnet. We are pleased to help and find the solution of your problem.

Javascript: Chage Background and Foreground Color onclick button


<script language="javascript">
function changebg(thecolor)

function changefg(thecolor)



<input type=button value="red" onclick="changebg(this)">
<input type=button value="black" onclick="changebg(this)">
<input type=button value="lightyellow" onclick="changebg(this)">
<input type=button value="lightgrey" onclick="changebg(this)">


<b<Welcome to my site</b><p>
<input type=button value="white" onclick="changefg(this)">
<input type=button value="blue" onclick="changefg(this)">
<input type=button value="brown" onclick="changefg(this)">
<input type=button value="darkblue" onclick="changefg(this)">


No comments:

Post a Comment