日期:2014-05-16 浏览次数:20402 次
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>显示/隐藏</title> <script type="text/javascript"> function display(id){ var target=document.getElementById(id); if(target.style.display=="none"){ target.style.display=""; }else{ target.style.display="none"; } } </script> </head> <body> <table> <tr id="menu" > <td>控制这个tr的显示/隐藏</td> </tr> <tr > <td><a href="#" onclick="display('menu')" >显示/隐藏</a></td> <tr> </table> </body> </html>
?