<script>
function button(s)
{
if(s==01){var c=s1;}
if(s==02){var c=s2;}
if(s==03){var c=s3;}
if(s==04){var c=s4;}
if(s==05){var c=s5;}
if(s==06){var c=s6;}
if(s==07){var c=s7;}
if(s==08){var c=s8;}
c.style.display="block";
}
</script>
<table align="center" width="550" height="166" border="0" cellpadding="1" cellspacing="1">
<tr>
<td><div align="center"><input type="button" name="S2" value="02" onclick="button(2)"/></div></td>
<td><div align="center"><input type="button" name="S1" value="01" onclick="button(1)"/></div></td></tr></table>
<table align="center" width="780" height="60" border="1" cellpadding="0" cellspacing="0">
<tr>
<td><div align="center" style="display:none" id="s2"><font color=#ff0000><b>02</b></font></div></td>
<td><div align="center" style="display:none" id="s1"><font color=#ff0000><b>01</b></font></div></td>
</tr></table>
js判断鼠标点了那个元素
答案:1 悬赏:70 手机版
解决时间 2021-02-24 09:05
- 提问者网友:相思似海深
- 2021-02-23 14:46
最佳答案
- 五星知识达人网友:迷人又混蛋
- 2021-02-23 15:46
<script>
function button(s)
{
if(s==01){var c=s1;}
if(s==02){var c=s2;}
if(s==03){var c=s3;}
if(s==04){var c=s4;}
if(s==05){var c=s5;}
if(s==06){var c=s6;}
if(s==07){var c=s7;}
if(s==08){var c=s8;}
c.style.display="block";
}
</script>
问题补充:
<table align="center" width="550" height="166" border="0" cellpadding="1" cellspacing="1">
<tr>
<td><div align="center"><input type="button" name="S2" value="02" onclick="button(2)"/></div></td>
<td><div align="center"><input type="button" name="S1" value="01" onclick="button(1)"/></div></td></tr></table>
<table align="center" width="780" height="60" border="1" cellpadding="0" cellspacing="0">
<tr>
<td><div align="center" style="display:none" id="s2"><font color=#ff0000><b>02</b></font></div></td>
<td><div align="center" style="display:none" id="s1"><font color=#ff0000><b>01</b></font></div></td>
</tr></table>
function button(s)
{
if(s==01){var c=s1;}
if(s==02){var c=s2;}
if(s==03){var c=s3;}
if(s==04){var c=s4;}
if(s==05){var c=s5;}
if(s==06){var c=s6;}
if(s==07){var c=s7;}
if(s==08){var c=s8;}
c.style.display="block";
}
</script>
问题补充:
<table align="center" width="550" height="166" border="0" cellpadding="1" cellspacing="1">
<tr>
<td><div align="center"><input type="button" name="S2" value="02" onclick="button(2)"/></div></td>
<td><div align="center"><input type="button" name="S1" value="01" onclick="button(1)"/></div></td></tr></table>
<table align="center" width="780" height="60" border="1" cellpadding="0" cellspacing="0">
<tr>
<td><div align="center" style="display:none" id="s2"><font color=#ff0000><b>02</b></font></div></td>
<td><div align="center" style="display:none" id="s1"><font color=#ff0000><b>01</b></font></div></td>
</tr></table>
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯