Limpando um Formulário com Jquery

by Admin 28. October 2009 17:58

Simples mas útil

 $(ele).find(':input').each(function() {
switch(this.type) {
case 'password':
case 'select-multiple':
case 'select-one':
case 'text':
case 'textarea':
$(this).val('');
break;
case 'checkbox':
case 'radio':
this.checked = false;
}
});

ele no exemploe pode ser um form ou uma div que agrega os componentes.

Fonte: http://www.electrictoolbox.com/jquery-clear-form/

Indicação: cinemacom

 

Tags:

Comments (1) -

Funny Love Quotes United States
8/25/2011 7:17:15 AM #

A formidable share, I just given this onto a colleague who was doing just a little analysis on this. And he in reality bought me breakfast because I found it for him.. smile. So let me reword that: Thnx for the treat! However yeah Thnkx for spending the time to discuss this, I really feel strongly about it and love reading more on this topic. If doable, as you change into expertise, would you mind updating your weblog with more details? It is extremely helpful for me. Big thumb up for this weblog post!

Add comment




  Country flag
biuquote
  • Comment
  • Preview
Loading


Sobre Mim

Felipe Augusto Silva Lambert - Analista de Sistemas, experiência em 4 anos desenvolvimento ASP.NET, utilizando tecnologias ServerSide (Design Patterns, Linq, WCF, SQL Server, C# e VB.NET) e ClientSide (JavaScript e Jquery). técnico em Mecatrônica e bacharel em Ciência da Computação.

Widget Month List not found.

Unknown server tag 'blog:MonthList'.X