Home > Web Front-end > JS Tutorial > jquery radio operation code_jquery

jquery radio operation code_jquery

WBOY
Release: 2016-05-16 18:09:18
Original
936 people have browsed it

//Set the second one as selected

//if(<%=rows["sex"]%>=="2"){$(':radio[name=sex]' ).eq(1).attr('checked',true);}

//Design value=2 to be in the selected state
//if(<%=rows["sex"] .ToString() %>=='2'){$("input[name='sex']").attr("checked",'2');}


if (<%=rows["sex"]%>=="2"){$("input[name=sex][value=2]").attr("checked",true);}

I did something NB today and none of the above three conditions worked. The reason is that the local database has been operating on the remote database.

JQuery gets radio

Copy code The code is as follows:


1
2
3
4
5





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