Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
если это что то типаи в себе содержит элементы таблицы такие как строки и ячейки,
<table>
<tr><td></td></tr>
<div>
<tr><td></td></tr>
</div>
<tr>
<div>
<td></td>
</div>
</tr>
</table>
display: none просто так не скрывает
[SIZE=2]
<html>
<head>
<title>Show/Hide Div embedded in Table</title>
<script language="JavaScript">
function anyObj(divName) {
this.IE5=this.NN4=this.NN6=false
if(document.all)this.IE5=true
else if(document.layers)this.NN4=true
else if(document.getElementById)this.NN6=true
if(this.NN4)this.obj=eval("document."+divName)
if(this.IE5)this.obj=eval("document.all."+divName)
if(this.NN6)this.obj=eval("document.getElementById(\""+divName+"\")")
this.show = showDiv
this.hide = hideDiv
this.showtext = showText
}
function showDiv() {
if(this.NN4) this.obj.visibility="visible"
else this.obj.style.visibility="visible"
}
function hideDiv() {
if(this.NN4) this.obj.visibility="hidden"
else this.obj.style.visibility="hidden"
}
function showText(content) {
if(this.NN4) {
// Couldn't get this to work inside table cell.
// this.obj.document.write(content)
// this.obj.document.close()
alert("I couldn't get part to work in NN4")
} else if(this.NN6) {
this.obj.innerHTML = content
} else if(this.IE5) {
content=content+"\n" // You have to have this new line character for a bug on Mac IE.
this.obj.innerHTML = content
}
}
</script>
<script language="JavaScript">
function initialize() {
myObj = new anyObj("tableDiv")
}
onload=initialize
</script>
<style type="text/css">
body {
font-size : 10px;
font-family : verdana;
color : #000066;
background-color: #cccccc[/SIZE][FONT=Courier New][SIZE=2];
text-align:center
[/SIZE][/FONT][SIZE=2]}
#tableDiv { position:relative[/SIZE][FONT=Courier New][SIZE=2];[/SIZE][/FONT][SIZE=2]}
</style>
</head>
<body>
<table border="1" cellspacing="5" cellpadding="5"[/SIZE][FONT=Courier New][SIZE=2]>
[/SIZE][/FONT][SIZE=2]<tr>
<td>cell #1</td>
<td>cell #2</td>
</tr>
<tr>
<td>cell #3</td>
<td>
[/SIZE][FONT=Courier New][SIZE=2][/SIZE][/FONT][SIZE=2][FONT=Times New Roman]<div id="tableDiv">[/FONT]
[/SIZE][FONT=Courier New][SIZE=2]<table border="1"><tr><td>qweqwe</td><td>qweqwe</td></tr></table>
[/SIZE][/FONT][SIZE=2][FONT=Times New Roman]</div>[/FONT]
[/SIZE][SIZE=2][/SIZE][SIZE=2][FONT=Times New Roman]</td>[/FONT]
</tr>
<tr>
<td>cell #5</td>
<td>cell #6</td>
</tr>
</table>
<br><br><br>
<a href="javascript:myObj.show();">show</a> |
<a href="javascript:myObj.hide();">hide</a>
</body>
</html>
[/SIZE]
да такую верстку и хотел((то нормальными средствами никак, т.к. подобные конструкции синтаксически не корректны и не допустимы..
во всех остальных случаях как раз display:none..