Is there an “after submit” jQuery option?

后端 未结 4 592
执笔经年
执笔经年 2020-12-03 02:31

I have a form that uploads a file and targets an iframe on the page. When the user clicks submit, I want the file contents to \"clear\" out.

I tried this

<         


        
4条回答
  •  感动是毒
    2020-12-03 03:13

    How are u submitting the form? if this is normal form post then then page wont exist in that case i am wondering if u are looking to clear the form before the page refreshses so that when the user comes back he doesn't see the values populated.

    If the form is submitted by ajax then you can

    function(){
     $('form1')[0].submit();
     clearForm();
    }
    

    Did i miss the question?

提交回复
热议问题