Fork me on GitHub

JavaScript鼠标单击双击事件

<!DOCTYPE html>
<html>
<head>
    <title></title>
    <meta charset="utf-8">
</head>
<body>
    <input type="button" onclick="test1()" ondblclick="test2()" value="点击">
    <script type="text/javascript">
//单击事件
function test1 () { console.log('单击'); }
//双击事件
function test2 () { console.log('双击'); } </script> </body> </html>

 

posted @ 2017-10-20 13:28  都一样*  阅读(706)  评论(0编辑  收藏  举报