开发者

submitting a form without hitting submit

开发者 https://www.devze.com 2023-03-18 01:02 出处:网络
I have a page, with a for开发者_开发百科m that has hidden fields. What I\'m looking to do, is when the user hits the page, they get a \'Redirecting you....\' and then the form is then submitted.

I have a page, with a for开发者_开发百科m that has hidden fields.

What I'm looking to do, is when the user hits the page, they get a 'Redirecting you....' and then the form is then submitted.

Can this be done using jQuery/PHP?

Thanks


To simply submit the form:

 $('#FormID').submit();

If you want to do other UI stuff while the form is being submitted look at using AJAX to submit the form and update the UI.

http://api.jquery.com/jQuery.ajax/


getElementById("frmID").submit();
0

精彩评论

暂无评论...
验证码 换一张
取 消