September 18, 200917 yr Hi! IT'S FRIDAY!!! WOOHOO Anyway down to business... ok with a simple javascript method like date, it outputs the date, and that's cool, but it's black writing and i am using a black background, so i would like to make it white! But just as a general learning process i was wondering how you can style the output of javascript functions and stuff? I would really appreciate your help on this one! Thanks p.s the code you need to output the date in a website is below if you want to experiment ;p <html> <body> <script type="text/javascript"> document.write(Date()); </script> </body> </html>
September 18, 200917 yr Hi If you put it in its own div class it should be fine <div class="white"> <script type="text/javascript"> document.write(Date()); </script> </div> Then css like .white { color:#FFFFFF; } Pat
September 18, 200917 yr Author AH YES!!!! Nice one mate, you have made my day! Thank you! I love learning new things!
Create an account or sign in to comment