简单的表格变色问题,在线等 希望最好能用 css 实现 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <tr onMouseOver="changeStyle(this, 'on');" onMouseOut="changeStyle(this, 'out');"> --------------function changeStyle(obj, cmd){ if(obj) try { var imgObj = obj.children(1).children(0); if(cmd == 'on') { obj.children(1).className = "ltdfocus"; obj.children(2).className = "rtdfocus"; if(imgObj) { if(imgObj.tagName.toUpperCase() == "IMG") { imgObj.src="file.gif"; imgObj.style.left = "-1px"; imgObj.style.top = "-1px"; } } } else if(cmd == 'out') { obj.children(1).className = "ltdexit"; obj.children(2).className = "rtdexit"; if(imgObj) { if(imgObj.tagName.toUpperCase() == "IMG") { imgObj.src="file1.gif"; imgObj.style.left = "0px"; imgObj.style.top = "0px"; } } } } catch (e) {}} 看看http://www.freewebs.com/hsdn/menu.htm的示例吧!对你很有帮助! 鼠标悬浮在DIV上是显示图片,出了DIV范围隐藏图片(图片可点击) 虚拟环境下多媒体教室的设计 js中引用name属性包含点号的输入框 excel下载时,怎样不让ie出现信息栏安全提示 找Html和JavaScript视频!!! 哪位帮我实现这个网站的功能 jsp onload 方法问题 高手们谁能提供这个效果的代码瞧瞧,感谢呢!!!! button 再问一个窗口问题,超级难题。 我用SRC引用有错吗??? 小问题:alert中的内容要引用变量!
function changeStyle(obj, cmd)
{
if(obj) try {
var imgObj = obj.children(1).children(0);
if(cmd == 'on') {
obj.children(1).className = "ltdfocus";
obj.children(2).className = "rtdfocus";
if(imgObj)
{
if(imgObj.tagName.toUpperCase() == "IMG")
{
imgObj.src="file.gif";
imgObj.style.left = "-1px";
imgObj.style.top = "-1px";
}
}
}
else if(cmd == 'out') {
obj.children(1).className = "ltdexit";
obj.children(2).className = "rtdexit";
if(imgObj)
{
if(imgObj.tagName.toUpperCase() == "IMG")
{
imgObj.src="file1.gif";
imgObj.style.left = "0px";
imgObj.style.top = "0px";
}
}
}
}
catch (e) {}
}