如何通过触发页面事件(例如select的chang),隐藏或显示页面组件的内容?给100分 Object.style.display = ""; //--ShowObject.style.display = "none"; //--Hide 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <html><head><title>调试</title><script language=javascript>function HideObj(Obj){ Obj.style.display = "none";}function ShowObj(Obj){ Obj.style.display = "";}</script></head><body><table id="Tab"> <tr> <td>这是表格内容</td> </tr></table><input type=button onclick="HideObj(window.document.all.Tab);" value="隐藏表格"><input type=button onclick="ShowObj(window.document.all.Tab);" value="显示表格"></body></html> 改了一下:<html><head><title>调试</title><script language=javascript>function ShowHideObj(Obj){ Obj.style.display = Obj.style.display=="none" ? "" : "none";}</script></head><body><input type=button onclick="ShowHideObj(Tab);" value="显示/隐藏"><table id="Tab"> <tr><td>这是表格内容</td></tr></table></body></html> jquery导航式弹出菜单问题,熟悉animate进 这句代码里的符号是什么意思? 如何通过JS 动态得到嵌套TABLE中TD的内容 一个很现实的问题,刷新后保持控件刷新前的状态的问题! js判断浏览器问题 求助:怎么才能让网页在一个FRAME内右对齐显示?? JQ .after() 和before()的问题 coombtree的input框怎么通过js隐藏 JavaScript中原型对象和继承的问题 chartist.js使用不出图 继续问全选的问题 请问用JAVASCRIPT怎样让主机喇叭发生,调用如beep()函数的功能
<head>
<title>调试</title>
<script language=javascript>
function HideObj(Obj)
{
Obj.style.display = "none";
}
function ShowObj(Obj)
{
Obj.style.display = "";
}
</script>
</head>
<body>
<table id="Tab">
<tr>
<td>这是表格内容</td>
</tr>
</table>
<input type=button onclick="HideObj(window.document.all.Tab);" value="隐藏表格">
<input type=button onclick="ShowObj(window.document.all.Tab);" value="显示表格">
</body>
</html>
<head>
<title>调试</title>
<script language=javascript>
function ShowHideObj(Obj)
{
Obj.style.display = Obj.style.display=="none" ? "" : "none";
}
</script>
</head>
<body><input type=button onclick="ShowHideObj(Tab);" value="显示/隐藏"><table id="Tab">
<tr><td>这是表格内容</td></tr>
</table></body>
</html>