关于 层 的 隐藏/显示 的问题,好困扰 上面的问题已解决: 把符号 & 改为 + 就可以了。(语言学多了也不好,忘了 javascript 中不可以用 & )现在的问题是: 当层 显示 出来后,我却无法点击到层里面的文字了。我该怎么做啊在线等,完成后立刻结贴。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <html><script langugae='javascritp'> function OverIt(num){ document.all("div" + num).style.display=''; } function OutIt(num){ document.all("div" + num).style.display='none'; } </script><body><p><p><p><table width=180 border=1 cellpadding=0 cellspacing=0> <tr><td width=30 height=22><div align=center><img src=images/topBar_bg.gif width=11 height=11></div></td> <td width=150 onmousemove='OverIt(2)' onmouseout='OutIt(2)' > <a href='Product.asp?BigClassName=键盘系列' id='A_Link2' >键盘系列</a> <div id=div2 style='position:absolute;display:none;width:100;'> <table border=1 cellpadding='0' cellspacing='0' width=200> <tr><td>罗技</td></tr> </table> <table border=1 cellpadding='0' cellspacing='0'> <tr><td>福晶</td></tr> </table> </div> </td> </tr></table></body></html> <html><script langugae='javascritp'> function OverIt(obj){ eval("var mdata = document.all.div" + obj.substr(6,1) + ".style.display"); clearTimeout(mhandle); if(mdata == "") return; eval('document.all.div' + obj.substr(6,1) + '.style.left=window.event.x'); eval('document.all.div' + obj.substr(6,1)) ; document.all.div2.style.display='';// (这句可以实现层的显示) eval("document.all.div" + obj.substr(6,1) + ".style.display=''"); //(这句不可以,一样的结果) }var _setTimeout1 = window.setTimeout;function _setTimeout(fRef, mDelay){ if(typeof fRef == 'function') { var argu = Array.prototype.slice.call(arguments,2); var f = (function(){ fRef.apply(null, argu); }); return _setTimeout1(f, mDelay); } return _setTimeout1(fRef,mDelay);}var mhandle = null; function OutIt(obj){ clearTimeout(mhandle); mhandle = _setTimeout(OutIt1,100,obj); } function OutIt1(obj){ eval("document.all.div" + obj.substr(6,1) + ".style.display='none'"); } function show_msg(mtd) { alert(mtd.innerHTML); }</script><body><div onmousemove='OverIt("A_Link2")' onmouseout='OutIt("A_Link2")' id=div2 style='position:absolute;display:none;'> <table border=1 cellpadding='0' cellspacing='0' width=200> <tr><td onclick='show_msg(this)'>罗技</td></tr> </table> <table border=1 cellpadding='0' cellspacing='0'> <tr><td onclick='show_msg(this)'>福晶</td></tr> </table></div><p><p><p><table width=180 border=1 cellpadding=0 cellspacing=0> <tr><td width=30 height=22><div align=center><img src=images/topBar_bg.gif width=11 height=11></div></td> <td width=150><a href='Product.asp?BigClassName=键盘系列' id='A_Link2' onmousemove='OverIt(this.id)' onmouseout='OutIt(this.id)'>键盘系列</a></td> </tr></table></body></html> 不明白为什么用那么多的“eval”把代码搞得有点乱。 MzTreeView怎样在节点聚焦的同时触发Click事件 有没有比较好的多文件批量替换字符串的工具?? 赋值出错? jquery ajax 请求回来的数据显示在页面 保留不住 xmlhttp和javascript结合的问题 这个问题好难哦!! what's mean is this? 求Tab面板,马上接贴,顶者有分~! 再线等待,一个关于控制层的显示问题。急~~~ 求助:这段jq代码是什么意思? 如何通过远程服务器启动本地应用程序? 怎么用javascript动态改变标记<html> 的内容?
<script langugae='javascritp'>
function OverIt(num){
document.all("div" + num).style.display='';
} function OutIt(num){
document.all("div" + num).style.display='none';
}
</script><body><p><p><p>
<table width=180 border=1 cellpadding=0 cellspacing=0>
<tr><td width=30 height=22><div align=center><img src=images/topBar_bg.gif width=11 height=11></div></td>
<td width=150 onmousemove='OverIt(2)' onmouseout='OutIt(2)' >
<a href='Product.asp?BigClassName=键盘系列' id='A_Link2' >键盘系列</a>
<div id=div2 style='position:absolute;display:none;width:100;'>
<table border=1 cellpadding='0' cellspacing='0' width=200>
<tr><td>罗技</td></tr>
</table>
<table border=1 cellpadding='0' cellspacing='0'>
<tr><td>福晶</td></tr>
</table>
</div>
</td>
</tr>
</table></body>
</html>
<script langugae='javascritp'> function OverIt(obj){
eval("var mdata = document.all.div" + obj.substr(6,1) + ".style.display");
clearTimeout(mhandle);
if(mdata == "") return;
eval('document.all.div' + obj.substr(6,1) + '.style.left=window.event.x');
eval('document.all.div' + obj.substr(6,1)) ;
document.all.div2.style.display='';// (这句可以实现层的显示)
eval("document.all.div" + obj.substr(6,1) + ".style.display=''"); //(这句不可以,一样的结果)
}
var _setTimeout1 = window.setTimeout;
function _setTimeout(fRef, mDelay)
{
if(typeof fRef == 'function')
{
var argu = Array.prototype.slice.call(arguments,2);
var f = (function(){ fRef.apply(null, argu); });
return _setTimeout1(f, mDelay);
}
return _setTimeout1(fRef,mDelay);
}
var mhandle = null;
function OutIt(obj){
clearTimeout(mhandle);
mhandle = _setTimeout(OutIt1,100,obj);
}
function OutIt1(obj){
eval("document.all.div" + obj.substr(6,1) + ".style.display='none'");
}
function show_msg(mtd)
{
alert(mtd.innerHTML);
}
</script><body><div onmousemove='OverIt("A_Link2")' onmouseout='OutIt("A_Link2")' id=div2 style='position:absolute;display:none;'>
<table border=1 cellpadding='0' cellspacing='0' width=200>
<tr><td onclick='show_msg(this)'>罗技</td></tr>
</table>
<table border=1 cellpadding='0' cellspacing='0'>
<tr><td onclick='show_msg(this)'>福晶</td></tr>
</table>
</div>
<p><p><p>
<table width=180 border=1 cellpadding=0 cellspacing=0>
<tr><td width=30 height=22><div align=center><img src=images/topBar_bg.gif width=11 height=11></div></td>
<td width=150><a href='Product.asp?BigClassName=键盘系列' id='A_Link2' onmousemove='OverIt(this.id)' onmouseout='OutIt(this.id)'>键盘系列</a></td>
</tr>
</table></body>
</html>
把代码搞得有点乱。