Home  >  Article  >  Web Front-end  >  jquery radio operation code_jquery

jquery radio operation code_jquery

WBOY
WBOYOriginal
2016-05-16 18:09:18908browse

//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





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