- From: <Fred_Deroche_at_corpsoftnorwood4@stream.com>
- Date: Mon, 03 Feb 97 08:06:29 EST
- To: www-html@www10.w3.org
Good Morning, The following script run onload() in the BODY statement. I want the script to change colors/background based on the time. Problems I'm having... 1. getMinutes is not defined - How can I set a variable minutes ? 2. setting bgcolor works when I change the variable manually, but how do you change the text color ? <SCRIPT LANGUAGE="JavaScript"> function bkcolor() { var now = Date(); var minutes = getMinutes(); <--- receives error minutes = getMinutes(); <--- receives error var minutes = 22; <--- works if (minutes > 30) {document.fgColor='white'}; if (minutes > 30) {document.bgColor='darkgreen'} ; thanks, fred
Received on Monday, 3 February 1997 10:01:41 UTC