Anyone familiar with HTML help me make a strobe out of my monitor?

Nick

New member
I'm using this code

<html><head>
<title>Strobe</title>

<script>
<!-- If you're extremely unlucky, you may break your equipment, or worse, have a seizure -->
function toggleBgColor()
{
document.bgColor = document.bgColor == '#000000' ? '00FF00' : '#000000';
setTimeout('toggleBgColor()', 75); //in milliseconds
}
</script>
</head>

<body onLoad='toggleBgColor();'>
</body></html>

and it works to flash from black to green very quickly, and its good. I'm wondering if anyone knows how to make the colors alternate every 5 seconds or so?

I'd like to make a gradient from dark to light and the loop it.
 
Back
Top