---
title: "jquery 一句搞定全选/全不选"
author: "surpass"
date: "2009-08-13T09:17:42Z"
tags: []
slug: "jquery"
draft: false
lastmod: "2009-08-13T09:17:42Z"
id: 446022
url: "https://surpass.iteye.com/blog/446022"
---

直接上代码

```
function check_all(){	    
			    $(":checkbox").attr("checked",$("input[name='all']").attr("checked"));
			} 
```