想在function{}里面实现一个鼠标放在td上面,td表格的右侧一边消失的效果

mine1981 2008-01-12 11:20:55
<scipt>
function MouseOverFunction(obj){
???????????????????????
}
</scipt>
......
<td onMouseOver=MouseOverFunction(this)>产品</td>
......
想在<scipt>function{}</scipt>里面实现一个鼠标放在td上面,td表格的右侧一边消失的效果,类似<td style="border-right:0 solid;">试了很多次都没有成功,难道在function里面不能这么做么?向高手请教了。
...全文
78 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
一品梅 2008-01-12
  • 打赏
  • 举报
回复
mark.
liumoujie3 2008-01-12
  • 打赏
  • 举报
回复
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<script language="javascript">
function hideTd(obj){
document.getElementById("0102").style.display = "none";
document.getElementById("0202").style.display = "none";
}
</script>
</HEAD>

<BODY>
<table id = "showTable" border='1' width ="100%">
<tr>
<th id ="0101" onmouseover="hideTd('0101')">1</th>
<th id ="0102">2</th>
<th>3</th>
<th>4</th>
<th>5</th>
<th>6</th>
</tr>
<tr>
<td id ="0201">12345</td>
<td id ="0202">12345</td>
<td>12345</td>
<td>12345</td>
<td>12345</td>
<td>12345</td>
</tr>
</table>
</BODY>
</HTML>
-----------------------------------
这段代码你可以参考一下,,另外就是可以根据其它方式取对象,,你可以自己试一下..
he_8134 2008-01-12
  • 打赏
  • 举报
回复
<script> 
function MouseOverFunction(obj){
obj.className="mouseover";
}
</script>
<style>
td{
border:1 solid black
}
.mouseover{
border-right:0;
}
</style>
<table>
<tr>
<td onMouseOver="MouseOverFunction(this)" onmouseout="this.className=''"> 产品 </td>
</tr>
</table>

87,992

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧