Joke Collection Website - Blessing messages - How to get the values ??of multiple check boxes in jquery?
How to get the values ??of multiple check boxes in jquery?
You can refer to the following code:
$(document).ready(function(){
varchecked=[];
$("#submitButton").click(function(){
$('input:checkbox:checked').each(function(){
checked.push($ (this).val());
});
alert(checked);
});
}) ;
Extended information:
jquery reference function
$("Element name").html("new?stuff" );?Set content for an element?
$("Element Name").removeAttr("Attribute Name")?Delete the specified attribute and the value of the attribute for an element?
< p>$("Element Name").removeClass("class")?Remove the specified style from an element?$("Element Name").text();?Get the text of the element ?
$("Element Name").text(value);?Set the text value of the element to value
Baidu Encyclopedia-jQuery
- Previous article:Can Samsung s8 set a ringtone for a single person?
- Next article:Can China Mobile Fetion receive the short message from Unicom?
- Related articles
- What does it mean that Gionee's mobile phone number is blocked?
- My mother-in-law scolded my mother. Am I right to answer back?
- How long can the honeycomb box express cabinet be stored for free?
- How to write the wedding invitation copy
- Spring Festival greetings are short and creative.
- Can I ask for a detailed tariff list for each brand of Hefei Mobile?
- Does it have to be the same day to renew the electrician's certificate?
- I have applied for a work visa in the Philippines but I no longer want to work. Do I need to lower my visa if I want to return to my country?
- Shoushan Education Bureau said that children were harassed by teachers. Is there any way to solve this problem?
- Christmas English blessing SMS