• 课太多了实在懒得一个一个点了
  • 记录下备用
(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




扫一扫在手机打开当前页
最后修改:2020 年 08 月 08 日 05 : 42 PM