此回复为自动发出,仅用于显示而已,并无任何其他特殊作用
楼主【mooninday】截止到2008-06-27 15:46:07的历史汇总数据(不包括此帖):
发帖数:21                 发帖分:790                
结贴数:13                 结贴分:470                
未结数:8                  未结分:320                
结贴率:61.90 %            结分率:59.49 %            
楼主加油

解决方案 »

  1.   

    <html>
    <style type="text/css">
     .d1{  height: 100px;  width: 100px;  background-color: red; } 
    </style> 
    <script>
     function d1click(){ alert("div1"); } 
    function t1blur(){ alert("text1"); document.getElementById("div1").style.display = "none"; } 
    </script> 
    <body> 
    <div id="div1" class="d1" onmousedown="d1click();"></div> <input type="text" id="t1" onBlur="t1blur();" /> 
    </body>
     </html>
      

  2.   

    <div id="div1" class="d1" onfocus="d1click();"></div>
      

  3.   


    <script>
    function d1click(){
        alert("div1");
        document.getElementById("div1").style.display = "none";
    }function t1blur(){
        alert("text1");
    }
    </script>
      

  4.   

    先触发onblur,弹出“text1”,然后把div1给隐藏掉了,隐藏掉了就不触发onclick了
      

  5.   

    这个问题似乎只在IE会出现,FireFox里是可以达到楼主要的效果的~~
      

  6.   

    我现在是想把在FireFox中,把光标聚交在text上,然后点击div,然后只要弹出了text,不弹出div1,又有什么办法?