Home >Web Front-end >JS Tutorial >Methods for obtaining radio objects in old and new versions of juqery_jquery

Methods for obtaining radio objects in old and new versions of juqery_jquery

WBOY
WBOYOriginal
2016-05-16 18:33:401102browse

New version (currently 1.3.2):

$("[name='radio_name'][checked]").val(), or $("input[name='radio_name']:checked" ).val()

Old version:


$("[@name='radio_name'][checked]").val(), or $("[@ name='radio_name']:checked").val()

The difference is that the old version has an additional @ symbol

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