By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,831 Members | 1,031 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,831 IT Pros & Developers. It's quick & easy.

Linking in Javascript

deephill
P: 37
hi
i need different linking and different style in Javascript.

Ex:
Expand|Select|Wrap|Line Numbers
  1. content[7]='<br><big><b>Products</b><br></big><br>Link1 | Link2 | Link3'
I need separate styles for Products and Links
and also i need separate Links for Link 1, Link 2, Link 3 etc...

Thanking you
Oct 13 '08 #1
Share this Question
Share on Google+
4 Replies


P: 93
Which field you want to chnage.On which event you want to change.
What function do you need ?Please make every thing clear.

If you want to change the style of the field then there is two ways you can do this .Write everything in the two different class function in css file .Include the css in your html file.

Now, call a function on some event in which code like this

document.getElementById('').className=='The name of the class in the css file';

else if you want to change the attributes of style then you can acess
as document.getElementById('').style.attribute='Whate ver you want ';
Oct 13 '08 #2

acoder
Expert Mod 15k+
P: 16,027
If you possibly can, set default settings using CSS. Use JavaScript for dynamic changing of settings. For a good list of style attributes you can set using the elem.style syntax, see this page.
Oct 13 '08 #3

deephill
P: 37
Hi..!
Thank you so much.
Oct 22 '08 #4

acoder
Expert Mod 15k+
P: 16,027
You're welcome :)
Oct 22 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.