模拟鼠标事件 DOM 1 var btn = document.getElementById("myBtn"); 2 3 //创建事件对象 4 var event = document.createEvent("MouseEvents"); 5 6 //初始化事件对象 7 event.initMouseEvent("click", true, true,... Other 2024-01-23 34 点赞 0 评论 51 浏览