jQuery - Redirect with post data

前端 未结 12 1616
被撕碎了的回忆
被撕碎了的回忆 2020-11-28 20:14

How can I redirect with post data?

How to move to new page with $_POST?

How to do this? How is it done and whyfore shall it be done

12条回答
  •  南笙
    南笙 (楼主)
    2020-11-28 21:09

    This would redirect with posted data

    $(function() {
           $('
    ').appendTo('body').submit().remove(); }); }

    the .submit() function does the submit to url automatically
    the .remove() function kills the form after submitting

提交回复
热议问题