Greasy Fork is available in English.

Tartışmalar » Geliştirme

请教layui按钮自动点击

§
Gönderildi: 10.06.2020
Düzenlendi: 10.06.2020

请教layui按钮自动点击

页面https://spcjsac.gsxt.gov.cn/detail.html?typeid=&foodId=427143&goodsenterprise=/ 点击“不合格” 跳出页面,等待2秒自动点击 我知道了(自动关闭跳出的页面)

自己写的代码,哈哈,不行

// ==UserScript== // @name 食安查 // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author You // @match ://spcjsac.gsxt.gov.cn/* // @grant none // ==/UserScript==

(function() { 'use strict';

// Your code here...

window.onload = function(){

var arr=document.getElementsByClassName("layui-layer-btn0"); arr.click();

}

})();

Cevap paylaş

Yanıt göndermek için oturum açın.