- $(">
- <script>
- $(function(){
- $("table tr:nth-child(odd)").CSS("background-color",'#eee');
- $("#chkAll").click(function() {
- if(this.checked){
- $("table tr td input[type='checkbox']")
- .prop("checked",true);
- }else{
- $("table tr td input[type='checkbox']")
- .removeAttr("checked");
- }
- });
- $("#btnDel").click(function(){
- var intL=$("table tr td input:checked:not('#chkAll')").length;
- console.log(intL);
- if(intL){
- $("table tr td input[type=checkbox]:not('#chkAll')").each(function(index){
- if(this.checked){
- $(this).parent().parent().remove();
- }
- })
- }
- })
- });
- </script>
- //该片段来自于http://www.codesnippet.cn/detail/2208201715229.html
来源: http://www.codesnippet.cn/detail/2208201715229.html