当每日一帖显示在当前 再去点击一下每日一帖时就会出现菜单没有反应请高手指点一二 :具体页面如下
<html>
<head>
<title>QQ菜单</title>
<meta http-equiv='Content-Type' content='text/html; charset=GBK'>
<script language='JavaScript'>
var headHeight = 22;var bodyHeight = 232;var objcount = 7;var step = 10;var moving = false;
function showme(obj1, obj2)
{
if (moving)
return;
moving = true;
for(i=0;i<document.all.tags('td').length;i++)
if (document.all.tags('td')[i].className.indexOf('headtd') == 0)
document.all.tags('td')[i].className = 'headtd1';
obj2.className = 'headtd2';
moveme(obj1);
}
function moveme(obj)
{
idnumber = parseInt(obj.id.substr(4));
objtop = headHeight * (idnumber - 1);
objbuttom = bodyHeight + headHeight * (idnumber - 2);
currenttop = parseInt(obj.style.top);
if (currenttop >= objbuttom)
{
countid = 1;
for(i=0;i<document.all.tags('div').length;i++)
if (document.all.tags('div')[i].id == 'item'+countid+'body')
{
obj = document.all.tags('div')[i];
objtop = headHeight * (countid - 1);
if (countid == idnumber)
{   //alert('1');
moveup(obj,objtop,false);
break;
}
else
   // alert('2');
moveup(obj,objtop,true);
countid++;
}
}
else if ((currenttop <= objtop) && (idnumber < objcount))
{
idnumber++;
countid = objcount;
for(i=document.all.tags('div').length-1;i>=0;i--)
if (document.all.tags('div')[i].id == 'item'+countid+'body')
{
obj = document.all.tags('div')[i];
objbuttom = bodyHeight + headHeight * (countid - 2);
//alert(countid+""+idnumber);
if (countid == idnumber)
{   
movedown(obj,objbuttom,false);
break;
}
else
movedown(obj,objbuttom,true);
countid--;
}
}
}
function moveup(obj,objtop,ismove)
{  
currenttop = parseInt(obj.style.top);
if (currenttop > objtop)
{
obj.style.top = currenttop - step;
setTimeout('moveup('+obj.id+','+objtop+','+ismove+')',1)
return;
}
moving = ismove;
}
function movedown(obj,objbuttom,ismove)
{   
currenttop = parseInt(obj.style.top);
if (currenttop < objbuttom)
{
obj.style.top = currenttop + step;
setTimeout('movedown('+obj.id+','+objbuttom+','+ismove+')',1)
return;
}
moving = ismove;
}    function openBulletin(URL)
    {
        
        var width="650";
        var height="500";
        var left = (screen.width/2) - width/2;
        var top = (screen.height/2) - height/2;
        var win=window.open(URL,'浏览公告内容',"left="+left+",top="+top+",height="+height+",width="+width+",resizable=1,scrollbars=yes");
        win.focus();
    }    function openNote(URL)
    {
        
        var width="545";
        var height="400";
        var left = (screen.width/2) - width/2;
        var top = (screen.height/2) - height/2;
        var win=window.open(URL,'浏览记事本内容',"left="+left+",top="+top+",height="+height+",width="+width+",resizable=1");
        win.focus();
    }
    //点击同步展开业务树
    function expandTree(classPath)
    { var itemList=[];
if(classPath!=null&&classPath!="")
{
itemList=classPath.split("/");
}
        var url = "/servlet/ActionServlet";
        url += ("?cur_load_path=" + escapeConvert(classPath));
        url += ("&to_expand=1&scroll_top=10");
        if(itemList.length>=2)
        {
         url += ("&curRootClassPath="+escapeConvert("/"+itemList[1]));
}
        if(parent!=null&&parent.parent!=null&&parent.parent.mainTree)
        {
         //parent.parent.mainTree.location.href =url;
         parent.parent.mainTree.location = url;
        }
        //window.location.href = url;
    }
</script>
<link href="main.css" rel="stylesheet" type="text/css" />
<style type='text/css'>
.headtd1 
{  
background: #e7ecf4; 
border: 1px outset; 
border-color: #9fbcdc #9fbcdc #9fbcdc #9fbcdc; 
cursor: hand; 
white-space: nowrap;
font-family: "宋体";
font-size: 12px;
color: #274c76;
padding-left:4px;
}
.headtd2 
{  
background: #e7ecf4; 
border: 1px outset; 
border-color: #9fbcdc #9fbcdc #9fbcdc #9fbcdc; 
cursor: hand;
white-space: nowrap;
font-family: "宋体";
font-size: 12px;
font-weight: bold;
color: #274c76;
padding-left:4px;
}
.bodytd  
{  
background: #eff7fc; 
border: 1px outset;
border-color: #ffffff #ffffff #ffffff #ffffff; 
font-size: 9pt
}
</style>
</head>
<body bgcolor='#eff7fc' text='#000000'>
<div id='mainboard' style='position:absolute; left:2px; top:2px; width:175px; height:368px; z-index:1; overflow: hidden' class="right_bg">
<div id='item1body' style='position:absolute; left:0; top:0; width:175px; height:232px; z-index:2; overflow: hidden' class="right_border">
<table width='100%' border='0' height='100%' cellpadding='2' cellspacing='0'>
<tr>
<td id='item1head' height='25' class='headtd2' onclick='showme(item1body,this)' align='center'>
事务
</td>
</tr>

              <tr>
     <td class='text_td' align='center'>&nbsp;
    
     </td>
    </tr>
              
</table>
</div>

解决方案 »

  1.   

    续:
    <div id='item2body' style='position:absolute; left:0; top:232; width:175px; height:232px; z-index:3; overflow: hidden'>
    <table width='100%' border='0' height='100%' cellpadding='2' cellspacing='0'>
    <tr>
    <td id='item2head' height='25' class='headtd1' onclick='showme(item2body,this)' align='center'>
    知识
                    </td>
    </tr>

                <tr>
    <td class='text_td' align='left'>
    <a href='viewFileContent.jsp?consultClassId=4215' target='mainContent' title='解释口径'>  
    &nbsp;&nbsp;解释..
    </a>
    </td>
    </tr>
                   
                  <tr>
         <td class='text_td' align='center'>&nbsp;
        
         </td>
        </tr>
                  
                  <tr>
         <td class='text_td' align='center'>&nbsp;
        
         </td>
        </tr>
                  
                  <tr>
         <td class='text_td' align='center'>&nbsp;
        
         </td>
        </tr>
                  
                  <tr>
         <td class='text_td' align='center'>&nbsp;
        
         </td>
        </tr>
                  
                  <tr>
         <td class='text_td' align='center'>&nbsp;
        
         </td>
        </tr>
                  
                  <tr>
         <td class='text_td' align='center'>&nbsp;
        
         </td>
        </tr>
                  
    </table>
    </div>
    <div id='item3body' style='position:absolute; left:0; top:254; width:175px; height:232px; z-index:4; overflow: hidden'>
    <table width='100%' border='0' height='100%' cellpadding='2' cellspacing='0'>
    <tr>
    <td id='item3head' height='25' class='headtd1' onclick='showme(item3body,this)' align='center'>
    公告
    </td>
    </tr>

                  <tr>
         <td class='text_td' align='center'>&nbsp;
        
         </td>
        </tr>
                  
    </table>
    </div>
    <div id='item4body' style='position:absolute; left:0; top:276; width:175px; height:232px; z-index:5; overflow: hidden'>
    <table width='100%' border='0' height='100%' cellpadding='2' cellspacing='0'>
    <tr>
    <td id='item4head' height='25' class='headtd1' onclick='showme(item4body,this)' align='center'>
    当日排行
    </td>
    </tr>
       
                  <tr>
         <td class='text_td'>
         <a href='viewFileContent.jsp?consultClassId=4213' target='mainContent' title='营销活动' align='right'>  
    直..
             </a>
         </td>
        </tr>
                        
                  
                        
                  
                        
                  
                        
                  
                        
                 
                        
                 
                        
                    
                    
    </table>
    </div>
    <div id='item5body' style='position:absolute; left:0; top:298; width:175px; height:232px; z-index:6; overflow: hidden'>
    <table width='100%' border='0' height='100%' cellpadding='2' cellspacing='0'>
    <tr>
    <td id='item5head' height='25' class='headtd1' onclick='showme(item5body,this)' align='center'>
    省热点
    </td>
    </tr>

                  <tr>
         <td class='text_td' align='center'>&nbsp;
        
         </td>
        </tr>
                  
    </table>
    </div>
    <div id='item6body' style='position:absolute; left:0; top:320; width:175px; height:232px; z-index:7; overflow: hidden'>
    <table width='100%' border='0' height='100%' cellpadding='2' cellspacing='0'>
    <tr>
    <td id='item6head' height='25' class='headtd1' onclick='showme(item6body,this)' align='center'>
    热点
    </td>
    </tr>

                  <tr>
         <td class='text_td' align='center'>&nbsp;
        
         </td>
        </tr>
                  
    </table>
    </div>
    <div id='item7body' style='position:absolute; left:0; top:342; width:175px; height:232px; z-index:8; overflow: hidden'>
    <table width='100%' border='0' height='100%' cellpadding='2' cellspacing='0'>
    <tr>
    <td id='item7head' height='25' class='headtd1' onclick='showme(item7body,this)' align='center'>
    每日一帖
    </td>
    </tr>
    <tr>
    <td align='center' class='text_td'>

      
      <div id="0" style="display:none" class='table_list'>
        <table width="95%"  border="0" valign="center" class='table_list'>
         <tr>
         <td height="10" align="center" class='text_title'>
           标 题
         </td>
         </tr>
         <tr>
        <td class='text_td'>
           测试
         </td>
            </tr>
            <tr>
             <td height="20" align="center" class='text_title'>
               内 容
             </td>
            </tr>
         <tr>
              <td class='text_td'>
              测试
              </td>
            </tr>
         </table>
       </div>
       
      <div id="1" style="display:none" class='table_list'>
        <table width="95%" border="0" valign="center" class='table_list'>
         <tr>
         <td height="10" align="center" class='text_title'>
           标 题
         </td>
         </tr>
         <tr>
        <td class='text_td'>
           新版
         </td>
            </tr>
            <tr>
             <td height="20" align="center" class='text_title'>
               内 容
             </td>
            </tr>
         <tr>
              <td class='text_td'>
              新版
              </td>
            </tr>
         </table>
       </div>
       
       <table border=0 width="100%" align="center">
       <tr>
         <td align="center" id="pre" style="display:none"><a href="#" onClick="displayPre();">上一条</a></td>
         <td align="center" id="next" style="display:none"><a href="#" onClick="displayNext();" >下一条</a></td>
       </tr>
    </table>

    </td>
    </tr>
    </table>
    </div>

    </div>
    </body>
    </html>
    <script language = 'javascript' type="">var initnum =( 2-1 );
    var num = 0;
    var staffNo = "1090";
    init();
    function init(){
      var tag = document.getElementById(num);
      tag.style.display = "block";
      if (initnum == 0)
      {
      
      }
    else{
    var obj = document.getElementById("next");
    obj.style.display = "block";
    }
    }
    function displayNext()
    {
      var tag = document.getElementById(num);
      tag.style.display = "none";
      num++;
      tag = document.getElementById(num);
      tag.style.display = "block";
      if (num == initnum )
      {
        var obj = document.getElementById("next");
        obj.style.display = "none";
        obj = document.getElementById("pre");
        obj.style.display = "block";
      }
      else
      {
        var obj = document.getElementById("next");
        obj.style.display = "block";
        obj = document.getElementById("pre");
        obj.style.display = "block";
      }
    }
    function displayPre()
    {
      var tag = document.getElementById(num);
      tag.style.display = "none";
      num--;
      tag = document.getElementById(num);
      tag.style.display = "block";
      if (num==0)
      {
        var obj = document.getElementById("pre");
        obj.style.display = "none";
        obj = document.getElementById("next");
        obj.style.display = "block";
      }
      else
      {
        var obj = document.getElementById("pre");
        obj.style.display = "block"
        obj = document.getElementById("next");
        obj.style.display = "block";
      }
    }
    </script>
      

  2.   

    晕,超简单的问题,改成这样就行了
    function showme(obj1, obj2)
    {//alert(moving);
    if (moving)
    return;
    //moving = true;//实际上就是只要注掉这里就行了,多余
    for(i=0;i<document.all.tags('td').length;i++)
    if (document.all.tags('td')[i].className.indexOf('headtd') == 0)
    document.all.tags('td')[i].className = 'headtd1';
    obj2.className = 'headtd2';
    moveme(obj1);
    }
    //还有,你的代码格式不好,所以,我把格式对齐后,1分钟就发现的了问题,试试看对不对
      

  3.   

    声明一下,你的代码没读完,我只针对你说的问题进行调试.测过后是你说的问题没了,但由于没详细去了解你的moving的作用,有没有带来新的问题,你自己应该清楚.
    一句话就是,实际发现,连点两次每一贴会造成moving==true;而不能执行到后面的代码.发现这点后,要怎么改你应该很清楚了.