不要用数字做为id开头.function showaa(obj1, obj2)
{
document.getElementById(obj1).style.display = "none";
document.getElementById(obj2).style.display = "";
}
{
document.getElementById(obj1).style.display = "none";
document.getElementById(obj2).style.display = "";
}
解决方案 »
- 新手问题!实现图片轮转播放!
- 关于js的Array调用了push缓存了dom对象的问题
- 关于iframe跨域方案的对比
- 如何获取外部html然后用dom进行解释
- 找一选择时间的控件
- 如何加快网页显示不受那些统计器影响
- 急急急!
- 超链接加了onclick属性,调用包含confirm的函数,不管点确定还是取消都无视confirm
- 帮忙解决javascript函数调用问题
- 请教会者,如何让用showModaldialog()打开的窗口中的连接点击后不开新窗口,在当前窗口中显示,也不用加一个FRAME的方法.
- 奇怪!复选框组个数为1时无法准确判断选择情况?
- 问下下,javascript中动态生成的表格怎么控制位置?
<head></head>
<body>
<script language="javascript">
function showaa(par, par1)
{
document.getElementByID(par).style.display = "";
document.getElementByID(par1).style.display = "none";
}</script>
<table border="1" width="40px">
<tr>
<td onmouseover='showadv("aa","bb")'>显示aa</td>
<td onmouseover='showadv("bb","aa")'>显示bb</td>
</table>
<table id="aa" border="1" width="200px" style="display:">
<tr><td>这个是aa</td></tr>
</table>
<table id="bb" border="1" width="200px" style="Display:none">
<tr><td>这个是bb</td></tr>
</table>
</body
</html>
<html>
<head></head>
<body>
<script language="javascript">
function showadv(par)
{
document.getElementById("aa1").style.display = "none";
document.getElementById("bb1").style.display = "none";
document.getElementById(par).style.display = "";}</script>
<table border="1" width="40px">
<tr>
<td onmouseover='showadv("aa1")'>显示aa</td>
<td onmouseover='showadv("bb1")'>显示bb</td>
</table>
<table id="aa1" border="1" width="200px" style="display:">
<tr><td>这个是aa</td></tr>
</table>
<table id="bb1" border="1" width="200px" style="Display:none">
<tr><td>这个是bb</td></tr>
</table>
</body
</html>