'display' Example : display « CSS Attributes and Javascript Style Properties « HTML CSS Reference

HTML CSS Reference
1. CSS Attributes and Javascript Style Properties
2. HTML Attributes Reference
3. HTML Tag Reference
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
HTML CSS Reference » CSS Attributes and Javascript Style Properties » display 
'display' Example

    
<html>
<head>
<style>
.style1 
    display:none 
}
</style>
<script language="JavaScript">
function function1() {
    item1.style.display="";
    item2.style.display="none";
    item3.style.display="none";
    }
function function5() {
    item1.style.display="";
    item2.style.display="";
    item3.style.display="";
    }
function function6() {
    item1_1.style.visibility="visible";
    item2_1.style.visibility="visible";
    item3_1.style.visibility="visible";
    }
</script>
</head>
<body>
<table cellspacing=cellpadding=border=2>
    <tr>
       <th>header 1</th>
       <th>header 2</th>
       <th>Header 3</th>
    </tr>   
    <tr id="item1">
       <td>Cars</td>
       <td id="item1_1">item 1</td>
       <td>item 2</td>
    </tr>
    <tr id="item2">
       <td>item 3</td>
       <td id="item2_1">item 4</td>
       <td>High</td>
    </tr>
    <tr id="item3">
       <td>item 5</td>
       <td id="item3_1">item 6</td>
       <td>Slow</td>
    </tr>
</table>
<p>
<input type=button style="width:175" onclick="function1()" value="Show some ">
<input type=button style="width:175" onclick="function6();function5()" value="Reset">
<ul>
    <li onclick="className='style1'">Item ? Double-click me</li>
    <li onclick="className='style1'">Item 2</li>
    <li onclick="className='style1'">Item 3</li>
    <li onclick="className='style1'">Item 4</li>
    <li onclick="className='style1'">Item 5</li>
</ul>
</body>
</html>

    
      
      
Related examples in the same category
1. 'display' Syntax and Note
2. 'display' Possible Values
3. 'display' is applied to
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.