Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jan 2010
    Posts
    79
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Javascript and CSS inline

    I have following HTML code:
    <br/>
    <div style="display:none">.....</div>
    <div style="display:none">.....</div>
    How can I modify display to block in style attribute with Javascript?

  • #2
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    Quote Originally Posted by dark0s View Post
    How can I modify display to block in style attribute with Javascript?
    How to modify when?

    You must call a function which will refer those elements and give them a display block. The schematic code to change the display is:
    Code:
    element.style.display='block';
    But you must first refer somehow that/those element(s), and for that you must isolate/group that/those element(s) somehow. Do you know JavaScript language, after all?
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •