![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
<
html
>
< head >
< meta http-equiv ="Content-Type" content ="text/html; charset=gb2312" />
< title > 无标题文档 </ title >
< script >
function Button2_onclick() { // 显示和隐藏表格的行;
if (tr1.style.display == "" ) {
tr1.style.display = " none " ;
} else {
tr1.style.display = "" ;
}
}
</ script >
</ head >
< body >
< form id ="form1" name ="form1" method ="post" action ="" >
< input type =button value ='显示' onclick ='javascript:Button2_onclick()' >
< table border =1 >
< tr >< td > sdfsdf </ td ></ tr >
< tr id =tr1 style ='display:none' >< td > sdfsd </ td ></ tr >
</ table >
</ form >
</ body >
</ html >
< head >
< meta http-equiv ="Content-Type" content ="text/html; charset=gb2312" />
< title > 无标题文档 </ title >
< script >
function Button2_onclick() { // 显示和隐藏表格的行;
if (tr1.style.display == "" ) {
tr1.style.display = " none " ;
} else {
tr1.style.display = "" ;
}
}
</ script >
</ head >
< body >
< form id ="form1" name ="form1" method ="post" action ="" >
< input type =button value ='显示' onclick ='javascript:Button2_onclick()' >
< table border =1 >
< tr >< td > sdfsdf </ td ></ tr >
< tr id =tr1 style ='display:none' >< td > sdfsd </ td ></ tr >
</ table >
</ form >
</ body >
</ html >