//自动点击的方法 clickId 点击事件的id属性值  字符串类型
function autoClick(clickId) {
    // IE
    if (document.all) {
        document.getElementById(clickId).click();
    }
    // 其它浏览器
    else {
        var e = document.createEvent("MouseEvents");
        e.initEvent("click", true, true);
        document.getElementById(clickId).dispatchEvent(e);
    }
}

 

相关文章:

  • 2021-11-19
  • 2022-02-07
  • 2021-11-20
  • 2021-12-14
猜你喜欢
  • 2021-11-20
  • 2021-08-12
  • 2021-12-31
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-19
相关资源
相似解决方案