Linking in Javascript

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • deephill
    New Member
    • Feb 2007
    • 37

    Linking in Javascript

    hi
    i need different linking and different style in Javascript.

    Ex:
    Code:
    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
  • Rsmastermind
    New Member
    • Sep 2008
    • 93

    #2
    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.getEle mentById('').cl assName=='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.getEle mentById('').st yle.attribute=' Whatever you want ';

    Comment

    • acoder
      Recognized Expert MVP
      • Nov 2006
      • 16032

      #3
      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.

      Comment

      • deephill
        New Member
        • Feb 2007
        • 37

        #4
        Hi..!
        Thank you so much.

        Comment

        • acoder
          Recognized Expert MVP
          • Nov 2006
          • 16032

          #5
          You're welcome :)

          Comment

          Working...