Home > Back-end >  Turn to the great god, why my js code is not working
Turn to the great god, why my js code is not working

Time:09-29

 



















<script type="text/javascript">
The function aaa () {
Var a=document. GetElementById (' answer '). The value;
alert(a);


}




all my selection box, click the value is' 1 ', forever

CodePudding user response:

JS in writing, in the reference is as follows:

CodePudding user response:

<script type="text/javascript">
The function aaa () {
Var obj=document. GetElementsByName (" answer ");
for(var i=0; iIf (obj [I]. Checked) {
Alert (obj [I] value);
}
}
}
</script>
  • Related