Home  >  Article  >  Web Front-end  >  js method to get type=radio value_javascript skills

js method to get type=radio value_javascript skills

WBOY
WBOYOriginal
2016-05-16 16:49:101312browse
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);
Statement:
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