<
head
>
<
meta
content
=
"text/html; charset=utf-8"
http-equiv
=
"Content-Type"
/>
<
script
type
=
"text/javascript"
>
//隐藏TR
function hide_tr()
{
alert("hide");
var result_style = document.getElementById('dyn_tr').style;
result_style.display = 'none';
}
//显示TR
function show_tr()
{
alert("show");
var result_style = document.getElementById('dyn_tr').style;
result_style.display = 'table-row';
}
</
script
>
<
title
>未命名 1</
title
>
</
head
>
<
body
>
<
table
border
=
"1"
>
<
tr
><
td
>1111</
td
><
td
>1111</
td
></
tr
>
<
tr
id
=
"dyn_tr"
style
=
"display: none;"
><
td
>222</
td
><
td
>222</
td
></
tr
>
<
tr
><
td
>333</
td
><
td
>333</
td
></
tr
>
</
table
>
<
input
type
=
"button"
value
=
"Hide"
onclick
=
"hide_tr()"
>
<
input
type
=
"button"
value
=
"Show"
onclick
=
"show_tr()"
>
</
body
>
</
html
>