这个在firefox浏览器就可以显示,但在其它浏览就不好用,是不是其它浏览器不$('#notice').toggle?
<td><img src="../images/rightMenu_04.png" width="80" height="38" alt="" onclick="$('#notice').toggle();showinfo();"  /></td>
///
<div id="notice" style="z-index: 10"><center><font color='red' size='5'>公告栏</font></center><br><span id='showinfo'></span></div>

解决方案 »

  1.   

    貌似写法不太标准$("#notice").click(function(){
        $(this).toggle();
        showinfo(); //此处的函数应该是LZ自己创建的吧。
    });
      

  2.   

    $("#notice").click(function(){
        $(this).toggle();
        showinfo(); //此处的函数应该是LZ自己创建的吧。
    });
    你这么写不对了,我的firefox都不好用了!
      

  3.   

    首先,jQuery对不同浏览器的支持是很好的。其次,如果LZ是用FireFox,那么建议你下一个Firebug,可以让你看到一些脚本的错误。第三,toggle的一个示例,我做了一个小的demo:http://www.rsywx.net/jquery/index.html,可以参考一下。
      

  4.   

    对不住,没注意到你的代码<img src="../images/rightMenu_04.png" width="80" height="38" alt="" id="img1" /><div id="notice" style="z-index: 10"> <center> <font color='red' size='5'>公告栏 </font> </center> <br> <span id='showinfo'> </span> </div>
    <script type="text/javascript">
    $("#img1").click(function(){
        $("#notice").toggle();
        showinfo(); //此处的函数应该是LZ自己创建的吧。
    });</script>
      

  5.   

    <td> <img src="../images/rightMenu_04.png" width="80" height="38" alt="" id='imgxxx' /> </td> 
    写法本身就不标准.  jQuery(function($)
      {  
         $("#imgxxx").click(function(){
             $('#notice').toggle();
             showinfo();
         });//imgxxx
      });
      

  6.   

    尽量不要在 onclick里直接写js
    <script>
      $('img#im').click(function(){
        $('#notice').toggle();showinfo();
      });
    </script>
    <td> <img src="../images/rightMenu_04.png" width="80" height="38" alt="" id="im"  /> </td> 
    /// 
    <div id="notice" style="z-index: 10"> <center> <font color='red' size='5'>公告栏 </font> </center> <br> <span id='showinfo'> </span> </div>
      

  7.   

    我这样写是可以的,这个简写形式!
    我在用一个小例子在其它浏览器上就可以实现的!下面的DIV就可以点击隐藏与出现的!
     <script type='text/javascript' src='./jquery-1.3.2.min.js'></script>
     </HEAD><script type='text/javascript'>
    function chat_say(){
       var msg=document.getElementById('msg').value;
       msg = encodeURI(msg);
    var xmlHttp=window.ActiveXObject ? new ActiveXObject("Microsoft.xmlHTTP"):new XMLHttpRequest();
    xmlHttp.onreadystatechange=function(){return chat_doHttpReadyStateChange.call(xmlHttp, xmlHttp)};
    xmlHttp.open("GET","/MytestProj/chat.php?&say="+msg,true);
    xmlHttp.send(null);
    }
    function chat_doHttpReadyStateChange(xmlHttp){

    if(xmlHttp.readyState==4 && xmlHttp.status == 200 ){

    var msg=document.getElementById("showmsg");
    var showmsg=xmlHttp.responseText;
    msg.innerHTML=showmsg;
      
    }
    }

    </script> <BODY><center>
         <h1>ChatRoom</h1><br/>
    <div id='showmsg'></div><br/>
     <input type='text' id='msg'></input><input type='button' value='发送' onclick='chat_say()'></input>  </center>
      <div id='text' style="backcolor:red">mytext</div>
      <br><input type="button" value='text' onclick="javascript:$('#text').toggle();">
     </BODY>
    </HTML>
      

  8.   

    问题已解决,原来是CSS样式出现了点问题!!谢谢大家!