That is, the user cannot select more than five checkboxes.
<! Doctype html public "-// W3C // dtd html 4.0 Transitional // EN"> <ptml> <pead> <title> New Document </title> <meta name = "Generator "content =" EditPlus "> <meta name =" Author "content =" "> <meta name =" Keywords "content =" "> <meta name =" Description "content = ""> </pead> <body> <table cellspacing = "0" border = "1" width = "200"> <tr> <td> <input type = "checkbox "name =" c "> </td> <input type =" checkbox "name =" c "> </td> <input type =" checkbox "name =" c "> </td> </tr> <td> <input type =" checkbox "name =" c "> </td> <td> <input type = "checkbox" name = "c"> </td> <input type = "checkbox" name = "c"> </td> </ tr> </body> </ptml>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]
Method 2
<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <ptml xmlns = "http://www.w3.org/1999/xhtml"> <pead> <meta http-equiv =" content-Type "content =" text/html; charset = gb2312 "/> <title> untitled document </title> </pead> <body> </ptml>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]
The above code can only be run in IE
Support for multiple browsers
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]