---
title: "jquery 表单清空 很强大！"
author: "hesai_vip"
date: "2012-09-25T11:01:10Z"
tags: []
categories: ["Web前端"]
slug: "jquery"
draft: false
lastmod: "2012-09-25T11:01:10Z"
id: 1684870
url: "https://vipshow.iteye.com/blog/1684870"
---

很强大的表单清空，包括了所有情况：

```
$(':input','#searchForm')  
 		.not(':button, :submit, :reset, :hidden')  
		 .val('')  
 		.removeAttr('checked')  
 		.removeAttr('selected'); 
```