www.webdeveloper.com
Results 1 to 2 of 2

Thread: Display:None appears on Firebug but does not appear on the file itself

  1. #1
    Join Date
    May 2010
    Posts
    2

    Display:None appears on Firebug but does not appear on the file itself

    Display:None appears on Firebug but does not appear on the file itself...
    what seems to be the problem? is this a virus or something?

    http://images.plurk.com/3147942_7c40...8375c9a472.jpg

    http://images.plurk.com/3147942_80fd...5584743e11.jpg

    check the links out.

    thanks in advance. i'm a super newbie here!

  2. #2
    Join Date
    Feb 2010
    Posts
    184
    It is known as dynamic javascript!

    See this example:
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    
    <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
    <title>Untitled 1</title>
    <script type="text/javascript">
    <!--
    	function toggle() {
    		var div = document.getElementById('div');
    		if(div.style.display == 'none') div.style.display = 'block';
    		else div.style.display = 'none';
    	}
    	//-->
    </script>
    </head>
    
    <body>
    
    <input onclick="toggle()" type="button" value="hide" />
    <div id="div">
    	Hello world</div>
    
    </body>
    
    </html>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles