Home>Article>Web Front-end> Detailed explanation of the selection method of jQuery in the selection box

Detailed explanation of the selection method of jQuery in the selection box

零下一度
零下一度 Original
2017-06-27 09:55:36 1260browse

The selection method of the select drop-down list is: $("slect option:eq(1)").attr("selected",true);//The selection method of the second option

chekbox :$("[value=check1"]:checkbox).attr("checked",true);

Radio selection method: $("[value=radio2"]:radio).attr(" checked",true);

The above are abbreviations, the important thing is to look at the code:

3-10-4   




多选1 多选2 多选3 多选4
单选1 单选2 单选3

The above is the detailed content of Detailed explanation of the selection method of jQuery in the selection box. For more information, please follow other related articles on the PHP Chinese website!

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