Clear Rails remote form after submitting

前端 未结 5 1836
刺人心
刺人心 2020-12-31 08:51

I\'m using Rails 3 with jQuery, and have a simple form with a single text input and a submit button. I have the form submitting with :remote => true, and wou

5条回答
  •  感动是毒
    2020-12-31 09:30

    In your action.js.erb file

    $('#message_content').attr('value','');
    

    Where action is the method name (which you don't state in your question) in your controller

提交回复
热议问题