7万
861
32万
论坛元老
参考:
jquery 表单 清空
$(':input','#myform') .not(':button, :submit, :reset, :hidden') .val('') .removeAttr('checked') .removeAttr('selected');
这个js是可以实现清空表单中填写及传入的值的,但要注意:
1、jq实现,此<input />不能放在form表单内!;
2、直接写在onclick属性中即可
使用道具 举报
14
1万
75
注册会员
0
68
2万
115
1
176
中级会员
2
380
124
61
本版积分规则 发表回复 回帖后跳转到最后一页
手机版|小黑屋|网站地图|源码论坛 ( 海外版 )
GMT+8, 2025-2-1 21:56 , Processed in 0.202519 second(s), 26 queries .
Powered by Discuz! X3.4
Copyright © 2001-2020, Tencent Cloud.