当前位置: 动力学知识库 > 问答 > 编程问答 >

javascript - How to reset the form fields after moving to other tab or on closing the current tab,java and jquery

问题描述:

I am using jquery-ui tabs ...Actually i want to reset the form fields after closing the current tab or if we move to another tab means form fields should be reseted.. I don't know how to reset the form fields at the close of tab.

Anything help me in this.

网友答案:

while closing tab call the below method as like onclick=resetForm('formid')

function resetForm(formId){
  $(’#’+formId)[0].reset();
}
分享给朋友:
您可能感兴趣的文章:
随机阅读: