jq遍历 下拉框


 var selectA1 = $("select[name=A1]"); //从A1下拉框中 搜索值
        $(selectA1).children("option").each(function () {
            //console.log(this.index);
            //console.log($(this).text());//每一个option
            if ($(this).text() === A1) {
                $("select[name=A1]").find('option:eq('+this.index+')').attr('selected', true);
            }
        });

使用框架遇到的坑


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM