HTML CSS Reference/CSS Attributes and Javascript Style Properties/display
Содержание
"display" Example
<source lang="html4strict">
<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>
header 1 | header 2 | Header 3 |
---|---|---|
Cars | item 1 | item 2 |
item 3 | item 4 | High |
item 5 | item 6 | Slow |
<input type=button style="width:175" onclick="function1()" value="Show some "> <input type=button style="width:175" onclick="function6();function5()" value="Reset">
- Item 1 ? Double-click me
- Item 2
- Item 3
- Item 4
- Item 5
</body> </html>
</source>
"display" is applied to
<source lang="html4strict">
+----------------+--------------------------------------------------------------+ | Applied_To |<a> <acronym> | | |<address> <applet> | | | |
| ||| |<body>
| | |<button>| | | | | |
| |<col> | | |<colgroup> currentStyle | | |<custom>
| | |defaults | | | <dir> ||
| |
- | | |<embed> <fieldset> | | | <form> | | |<frame> <hn> | | |
<html> || | <iframe> | | |<img> <input type="button"> | | |<input type="checkbox"> <input type="file"> | | |<inputtype="image"> <input type="password"> | | |<input type="radio"> <input type="reset"> | | |<input type="submit"> <input type="text"> | | | | | |<label> <legend> |
| |- <listing> | | |<marquee> <menu> | | |<nobr> <object> | | |
<p> | | |
| | |