自动提交隐藏的表单 [英] Auto-submit hidden form

查看:72
本文介绍了自动提交隐藏的表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


我正在尝试自动提交一个隐藏的表格。


到目前为止,我有......但它让我陷入无限循环。任何人都有任何想法。我是这样的菜鸟......


Hello,

I am trying to autosubmit a hidden form.

So far I have...... but it sends me into an infinite loop. Anyone got any ideas. I am such a noob...



展开 | 选择 | Wrap | 行号

推荐答案

这将导致您进入无限循环,因为您正在提交到同一页面。当该页面加载时,它会一次又一次地提交!


为了防止这种情况,请传递一个应该设置您已提交的变量。如果没有设置,请提交表格,否则请不要提交。
This will send you into an infinite loop because you are submitting to the same page. When that page loads, it submits again and again and again!

To prevent that, pass a variable which should set that you''ve submitted. If that''s not set, submit the form, otherwise do not submit.


Acoder,谢谢你的帮助。我在想这些方面的东西是可行的,但我还处于学习java的早期阶段。你能否告诉我一个如何传递变量的例子,说明我已经提交了。非常感谢您的指导。
Acoder, thank you for your help. I was thinking something along those lines would work, but I am in the early stages of learning java. Could you possible show me an example of how to pass a variable saying that I have submited. Your guidance is greatly appreciated.


嗨亲爱的

您可以使用查询字符串。喜欢它:


< form action ="?sendStat = sent">


最好的问候。


mh
hi dear
you can use query string. like it:

<form action="?sendStat=sent">

best regards.

mh


这篇关于自动提交隐藏的表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆