JQuery supports both full selection and no selection.

Source: Internet
Author: User

<Title> </title>
<Script src = "Jquery1.7.js" type = "text/javascript"> </script>
<Style type = "text/css">
Img
{
Width: 50px; height: 50px;
}
Table
{
Width: 600px; height: 400px;
}
Table tr td {border: solid 1px # eee ;}
</Style>
<Script type = "text/javascript">


$ (Function (){
Var table = $ ('table tr ');
Alert ($ ('input'). length );
})


</Script>
</Head>
<Body>
<Div>
<Input id = "Checkbox7" type = "checkbox" onclick = "return change (this) "/> select all <input id =" Checkbox8 "type =" checkbox "/> invert selection </div>
<Table>
<Tr>
<Td>
Operation
</Td>
<Td>
No.
</Td>
<Td>
Name
</Td>
<Td>
Author
</Td>
<Td>
Cover
</Td>
<Td>
Unit Price
</Td>
</Tr>
<Tr>
<Td>
<Input id = "Checkbox1" type = "checkbox"/>
</Td>
<Td>
001
</Td>
<Td>
Romance of Three Kingdoms
</Td>
<Td>
Luo Guanzhong
</Td>
<Td>

</Td>
<Td>
45
</Td>
</Tr>
<Tr>
<Td>
<Input id = "Checkbox2" type = "checkbox"/>
</Td>
<Td>
002
</Td>
<Td>
Travel to the west
</Td>
<Td>
Wu chengen
</Td>
<Td>

</Td>
<Td>
40
</Td>
</Tr>
<Tr>
<Td>
<Input id = "Checkbox3" type = "checkbox"/>
</Td>
<Td>
003
</Td>
<Td>
Water Margin
</Td>
<Td>
Shi nai
</Td>
<Td>

</Td>
<Td>
50
</Td>
</Tr>
<Tr>
<Td>
<Input id = "Checkbox4" type = "checkbox"/>
</Td>
<Td>
004
</Td>
<Td>
Dream of Red Mansions
</Td>
<Td>
Cao Xueqin
</Td>
<Td>

</Td>
<Td>
100
</Td>
</Tr>
<Tr>
<Td>
<Input id = "Checkbox5" type = "checkbox"/>
</Td>
<Td>
005
</Td>
<Td>
Home
</Td>
<Td>
Bajin
</Td>
<Td>

</Td>
<Td>
45
</Td>
</Tr>
<Tr>
<Td>
<Input id = "Checkbox6" type = "checkbox"/>
</Td>
<Td>
006
</Td>
<Td>
Teahouse
</Td>
<Td>
Lao She
</Td>
<Td>

</Td>
<Td>
35
</Td>
</Tr>
</Table>
</Body>


</Html>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.