Aker15
03-01-2012, 07:25 PM
I have completely no idea why this is not working...
<script type="text/javascript">
var BGS = new Array();
BGS[0] = '#00FF00'; /// YELLOW ///
BGS[1] = '#FF0000'; /// RED ///
function changebgr(choice)
{
document.bgColor = BGS[choice];
}
function reloadpage()
{
window.location.reload();
}
document.write(Date());
</script>
Idea's?
The changebgr function is not working when i do this:
<center><input type="button" value="Red Background" onclick="changebgr(1)"></center>
<center><input type="button" value="Yellow Background" onclick="changebgr(0)"></center>
<script type="text/javascript">
var BGS = new Array();
BGS[0] = '#00FF00'; /// YELLOW ///
BGS[1] = '#FF0000'; /// RED ///
function changebgr(choice)
{
document.bgColor = BGS[choice];
}
function reloadpage()
{
window.location.reload();
}
document.write(Date());
</script>
Idea's?
The changebgr function is not working when i do this:
<center><input type="button" value="Red Background" onclick="changebgr(1)"></center>
<center><input type="button" value="Yellow Background" onclick="changebgr(0)"></center>