大神给看看if语句应该怎么写 var s1 = document.getElementById("s1"); var v1 = ${alarmrecord.alarmCategory} for(i = 0;i

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/22 21:08:15
大神给看看if语句应该怎么写vars1=document.getElementById("s1");varv1=${alarmrecord.alarmCategory}for(i=0;i大神给看看if

大神给看看if语句应该怎么写 var s1 = document.getElementById("s1"); var v1 = ${alarmrecord.alarmCategory} for(i = 0;i
大神给看看if语句应该怎么写

var s1 = document.getElementById("s1");
var v1 = ${alarmrecord.alarmCategory}
for(i = 0;i

大神给看看if语句应该怎么写 var s1 = document.getElementById("s1"); var v1 = ${alarmrecord.alarmCategory} for(i = 0;i
    <script type="text/javascript">
    var s1 = document.getElementById("s1");
    var v1 = ${alarmrecord.alarmCategory}
    for(i = 0;i<=s1.length;i++){
        if(s1.options[i].value.equal(v1);){
            s1.options[i].selected = true;
        }
        
    }
    </script>