日期:2014-05-17  浏览次数:20480 次

如何在DIV层上双击这个层的方法呢?
就是如何实现在这个层上双击的方法,弹出另一个页面!!!请大家给一个例子。onclick方法。

------解决方案--------------------
javascript应该是有双击事件的吧。
------解决方案--------------------

<script type="text/javascript">
        $(function () {
            $(".test").dblclick(function () {
                location.href = "http://csdn.net";
             //   window.open();
            });
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="test" style=" width:200px; height:200px; background-color:#000000; cursor:pointer;" title="请双击">
    
    </div>
    </form>
</body>
</html>

------解决方案--------------------
+1,大圣说的对
引用:
C# code?1234567891011121314151617<script type="text/javascript">        $(function () {            $(".test").dblclick(function () {                location.href = "http://csdn.net";     ……

------解决方案--------------------

    <script type="text/javascript">
            function test()
            {
                    alert("双击了"); 
            }
    </script>
        <div ondblclick="test()" style="width:500px; border:solid 1px red; height:300px">
                在此区域双击
        </div>

------解决方案--------------------
引用:
XML/HTML code?123456789    <script type="text/javascript">            function test()            {                    alert("双击了");             }    </script>        <div ondblclick="test……


 function test()