onmouseover="$('newspecial').id = 'newspecialtmp';this.id = 'newspecial';showMenu({'ctrlid':this.id})"上面是PHP网页里的一段代码。
换句话说,onmouseover这个鼠标事件,可不可以取消,让菜单直接显示出来?
谢谢各位高手!

解决方案 »

  1.   

    .........你的onmouseover干了件什么事情啊???就是单独的一个显示菜单的效果吗、?代码贴出来撒  站内信 不多说
      

  2.   

     <!--{if !$_GET['archiveid']}-->
    <a href="javascript:;" id="newspecial" onmouseover="$('newspecial').id = 'newspecialtmp';this.id = 'newspecial';showMenu({'ctrlid':this.id})"
    {if !$_G['forum']['allowspecialonly'] && empty($_G['forum']['picstyle']) && !$_G['forum']['threadsorts']['required']} onclick="showWindow('newthread', 'forum.php?mod=post&action=newthread&fid=$_G[fid]')"
    {else} onclick="location.href='forum.php?mod=post&action=newthread&fid=$_G[fid]';return false;"{/if} title="{lang send_posts}">
    <img src="{IMGDIR}/pn_post.png" alt="{lang send_posts}" /></a><!--{/if}-->这是完整的一段代码。实际上是discuz论坛的一个发帖按钮的代码
    鼠标滑过会有发帖下拉菜单。我现在想让它直接显示。不知道怎么弄,谢谢了!
      

  3.   

    你说的是什么意思。是不是显示onmouseover中的代码,还是说要直接把onmouseover的效果不要鼠标移上去就显示出来。
      

  4.   

    那你把在onmouseover里调用的东西在页面加载完了时调用  去掉<a>标签里面的onmouseover事件
    $(document).ready(function(){
       $('newspecial').id = 'newspecialtmp';
       $("#newspecial").attr('id', 'newspecial');
      showMenu({'ctrlid':this.id});
    });
      

  5.   

    <!--{if !$_GET['archiveid']}-->
    <a href="javascript:;" id="newspecial" onmouseover="$('newspecial').id = 'newspecialtmp';this.id = 'newspecial';showMenu({'ctrlid':this.id})"
    {if !$_G['forum']['allowspecialonly'] && empty($_G['forum']['picstyle']) && !$_G['forum']['threadsorts']['required']} onclick="showWindow('newthread', 'forum.php?mod=post&action=newthread&fid=$_G[fid]')"
    {else} onclick="location.href='forum.php?mod=post&action=newthread&fid=$_G[fid]';return false;"{/if} title="{lang send_posts}">
    <img src="{IMGDIR}/pn_post.png" alt="{lang send_posts}" /></a><!--{/if}-->改成下面这样吗?对JS一窍不通啊<!--{if !$_GET['archiveid']}-->
    <a href="javascript:;" id="newspecial" $(document).ready(function(){
      $('newspecial').id = 'newspecialtmp';
      $("#newspecial").attr('id', 'newspecial');
      showMenu({'ctrlid':this.id});
    });

    {if !$_G['forum']['allowspecialonly'] && empty($_G['forum']['picstyle']) && !$_G['forum']['threadsorts']['required']} onclick="showWindow('newthread', 'forum.php?mod=post&action=newthread&fid=$_G[fid]')"
    {else} onclick="location.href='forum.php?mod=post&action=newthread&fid=$_G[fid]';return false;"{/if} title="{lang send_posts}">
    <img src="{IMGDIR}/pn_post.png" alt="{lang send_posts}" /></a><!--{/if}-->
      

  6.   

    去掉<a>标签里面的onmouseover事件
    在</html>标签下面加上
    <script type='text/javascript'>
      $(document).ready(function(){
        $('newspecial').id = 'newspecialtmp';
        $("#newspecial").attr('id', 'newspecial');
       showMenu({'ctrlid':this.id});
     });
    </script>