<HTML>
<HEAD>
<TITLE> New Document </TITLE>
</HEAD>
<BODY>
<TABLE>
<TR>
<TD> first column </TD>
<TD> second column </TD>
</TR>
</TABLE>
<HR>
<TABLE id = adv style = "DISPLAY: none">
<TR>
<TD> hide a table </TD>
<TD> hide a table </TD>
<TD> hide a table </TD>
</TR>
<TR>
<TD> hide a table </TD>
<TD> hide a table </TD>
<TD> hide a table </TD>
</TR>
</TABLE>
<Form name = "theForm">
<Input type = "button" NAME = "advshow" id = "advance" onclick = showadv (this) value = "show advanced user setting options">
</Form>
</BODY>
<Script language = "JavaScript">
<! --
Var isShow = false;
Function showadv (bt ){
If (isShow ){
Document. getElementById ("adv"). style. display = "none ";
Bt. value = "show advanced user setting options ";
IsShow = false;
} Else {
Document. getElementById ("adv"). style. display = "";
Bt. value = "Disable advanced user settings ";
IsShow = true;
}
}
// -->
</SCRIPT>
</HTML>
Dynamic table Generation and dynamic table Control
Stable + = "<table border = '1'> ";
For (int I = 0; I <3; I ++)
{
String btnname = "adv" + I. ToString ();
Stable + = "<tr> ";
Stable + = "<td> question: what your name? <Input type = 'button 'name = 'advshow' onclick = 'showtd (\ "" + btnname + "\") 'value = 'display question answer'/> ";
Stable + = "</td> </tr> ";
Stable + = "<tr> ";
Stable + = "<td> <table border = '1' id = '" + btnname + "'style = 'display: none'> ";
Stable + = "<tr> <td> anser: my name is kitty ";
Stable + = "</td> </tr> ";
Stable + = "</table> </td> ";
Stable + = "</tr> ";
}
Stable + = "</table> ";
<Script type = "text/javascript">
// Var isShow = false;
Function showtd (id ){
Alert ("111 ");
If (document. getElementById (id). style. display = ""){
Document. getElementById (id). style. display = "none ";
// Bt. value = "show Question Answer ";
// IsShow = false;
} Else {
Document. getElementById (id). style. display = "";
// Bt. value = "answer to your questions ";
// IsShow = true;
}
}
</Script>