This is a discussion on "Javascript style" within the JavaScript Forum section. This forum, and the thread "Javascript style are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Javascript style
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Javascript style
Hello fireds
GOOD LUCK! |
|
|
|
|||
|
Re: Javascript style
Bit of a pointless question as it stands. Change from what color to what color and under what cirumstances. |
|
||||
|
Re: Javascript style
it doesn't change because the script executes before the page has loaded.
change it to: <html> <head> <script language="javascript"> window.onload = function(){ document.getElementById("mylink").style.color="#0000ff"; document.write("salam"); } </script> </head> <body> <a id="mylink" href="http://www.dynamicdrive.com">Dynamic Drive</a> </body> </html>
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
|
![]() |
| Tags |
| javascript, style |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| style | MetallicWarfare | Starting Out | 12 | Aug 13th, 2007 09:00 |
| web style | littlebilly | Website Planning | 7 | Jul 22nd, 2007 14:58 |
| How to tell IE7 to use a pariticular style in a single style sheet | figo2476 | Web Page Design | 5 | May 25th, 2007 14:23 |
| Using javascript to alter style properties of a DIV | flamin_mongrel | JavaScript Forum | 3 | Oct 18th, 2006 21:34 |
| Just for style? | timmytots | Web Page Design | 4 | Nov 17th, 2005 21:01 |