Home >Web Front-end >JS Tutorial >JQuery operates checkbox (loop acquisition)_jquery

JQuery operates checkbox (loop acquisition)_jquery

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-05-16 18:06:321227browse
Copy code The code is as follows:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DemoCheckBox.aspx.cs" Inherits="DemoCheckBox" %>



Untitled page














checkbox1

checkbox2

checkbox3

checkbox4

checkbox5

checkbox6

checkbox7

checkbox8





jquery loop reading Get the checkbox value
Copy code The code is as follows:

$("input[type=checkbox] [checked]").each(function(){ //Since multiple check boxes are generally selected, you can output them in a loop
alert($(this).val());
});
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