Clear a form with jQuery
来源:互联网 发布:js 获取Li 编辑:程序博客网 时间:2024/05/18 00:02
function clear_form_elements(ele) {
$(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).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;
}
});
}
原文链接:http://www.electrictoolbox.com/jquery-clear-form/
- Clear a form with jQuery
- Submit a JQuery Mobile form via AJAX with PHP
- How to POST a django form with AJAX & jQuery
- Fck with Jquery Form Plugin
- A jQuery inline form validation
- Reflect on my life with a clear mind
- jsForm - Html Form via JSON with jQuery
- Zen of PM - Speaking with a ClearPerspective and a Clear Voice
- jQuery requires a window with a document
- extjs4.1 form field clear
- Using Mimikatz Alpha or Getting Clear Text Passwords with a Microsoft Tool
- jquery datepicker clear date
- How to Create Login Form with CSS3 and jQuery
- Lesson45 A clear consicience
- Dynamically Add Controls to a Form with Visual Basic 6.0
- How to Submit a Form with Control + Enter
- Smarten Up a Slick Login Form With CSS3
- Creating a Web App with jQuery UI
- flex bug
- virtualbox如何共享文件
- centos 6 编译mongo-cxx-driver
- Cloud Wars – U.S. Army Using Agile Platform For Cloud Migration
- C++中的 引用和指针区别
- Clear a form with jQuery
- 在maven中添加第三方jar包
- java bat(简化的exe文件)
- Linux下的Memcache安装
- hibernate中根据model的配置文件创建数据库
- owl_cpp,一个用于操作OWL本体的C++类库(owl_cpp, a C++ Library for Working with OWL Ontologies)
- QC 9.0 支持IE7 IE8 解决方案
- SQLite学习手册(内置函数)
- the network bridge on device vmnet0 is not running解决方法