Home > Web Front-end > JS Tutorial > body text

js method to get type=radio value_javascript skills

WBOY
Release: 2016-05-16 16:49:10
Original
1352 people have browsed it
Copy code The code is as follows:



  • < ;input type="radio" name="radio" value="Pay at the front desk" id="radio" />Pay at the front desk - If you want to reserve the room for the whole night, please pay the room fee in advance.


  • Guaranteed payment - slightly Customer service staff will then call you to
    confirm the information required for the guarantee.



Copy code The code is as follows :

var chkObjs=null;

var obj=document.getElementsByName("radio")
for (var i=0;iif(obj[i].checked){
chkObjs=obj[i].value;
}
}
alert(chkObjs);
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template