• 课太多了实在懒得一个一个点了
  • 记录下备用
(function(){
    var done = false;
    var length = document.getElementById("iframeautoheight").contentWindow.document.getElementById("pjkc").getElementsByTagName("option").length;
    var count = 0;
    try{
        var setAll = function(){
            var selects = document.getElementById("iframeautoheight").contentWindow.document.getElementsByClassName("datelist")[0].getElementsByTagName("select");
                selects[0].value="B";
    for(var i =1; i < selects.length;i++){
                selects[i].value="A";
            };
        };
        var submitData = function(){
            if(done) return;
            if(count >= length) {
                console.log("all done, have fun!");
                done = true;
                document.getElementById("iframeautoheight").contentWindow.document.getElementById("Button2").click();
                return;
            }
            count ++;
            document.getElementById("iframeautoheight").contentWindow.document.getElementById("Button1").click();
        };
        document.getElementById("iframeautoheight").addEventListener("load", function(){
            setAll();
            submitData();
        });
        setAll();
        submitData();
    }
    catch(e){
        done = true;
    }
})();

修改自:https://blog.csdn.net/ly0724ok/article/details/90524641

新的正方系统:
2021-6-22

function auto() {
    $(".input-xspj-1").find(".radio-pjf").attr("checked","checked");
    $(".table-xspj").find(".tr-xspj").first().find(".input-xspj-2").find(".radio-pjf").attr("checked","checked");
    $("#btn_xspj_tj").click();
    $("#btn_ok").click();
}

var len = $("#tempGrid").children(":first").children().length;
var item = $("#tempGrid").children(":first").children(":first");
for(var i = 0; i < len + 1; i++) {
    (function(i) {
        setTimeout(function() {
        auto();
            console.log(i);
        $("#" + i).click();            
        }, (i + 1) * 1000);
    })(i)
}



扫一扫在手机打开当前页