Home > Web Front-end > JS Tutorial > body text

jquery gets all selected checkboxes with a specific name, supports IE9 standard mode_jquery

WBOY
Release: 2016-05-16 17:40:25
Original
969 people have browsed it

The original statement is var selectChks = $("input[type=checkbox][name=productItem][checked]");
It can be obtained normally in IE7, IE8 and IE9 compatibility modes
But in It cannot be obtained in IE9 standard mode. The length is always 0
So I checked the information and found the following writing method
var selectChks = $("input[type=checkbox][name=productItem]:checked");
After testing, it can also be used normally in IE7, IE8 and IE9 compatibility modes, and IE9 standard mode

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!