亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

jQuery mouse event click event

Among interactive operations, the simplest and most direct operation is the click operation.

jQuery provides two methods. One is the click method to monitor the user's click operation, and the other method is the dbclick method to monitor the user's double-click operation.

The usage of these two methods is similar. The following takes the click() event as an example.

It is very simple to use: $('').click()

Let's take a look at an example

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>事件</title>
    <script src="http://libs.baidu.com/jquery/1.9.1/jquery.js"></script>
</head>
<body>
    <input type="button" value="click">

    <script>
        $("input").click(function(){
            alert("觸發(fā)點(diǎn)擊事件");
        })
    </script>
</body>
</html>

As shown in the above code, we can see that we have created a click event for the button. You can try it locally

Continuing Learning
||
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>事件</title> <script src="http://libs.baidu.com/jquery/1.9.1/jquery.js"></script> </head> <body> <input type="button" value="click"> <script> $("input").click(function(){ alert("觸發(fā)點(diǎn)擊事件"); }) </script> </body> </html>
submitReset Code