Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

支持事件是同步代码 #5

Open
zhengwei1949 opened this issue May 17, 2017 · 0 comments
Open

支持事件是同步代码 #5

zhengwei1949 opened this issue May 17, 2017 · 0 comments

Comments

@zhengwei1949
Copy link

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <input type="button" id="btn" name="" value="">
    <script>
        var oBtn = document.querySelector('#btn');
        oBtn.addEventListener('click',function(){
            console.log(111);
        },false);
        oBtn.click();
        console.log(222);
    </script>
</body>
</html>

打印结果是先打印111,再打印222

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant