如何在onload()函数中禁用Jquery中的多个表单提交

时间:2014-04-16 13:22:30

标签: javascript jquery jsp

我在表单中有JSP onload函数。这使JavaScript能够提交表单。无论以F5(刷新)形式提交多份表格,我都要求提交一次表格。

<html>
    <head>
        <title>my JSP</title>
        <script type="text/javascript">
            function onload() {
                alert("This form should submit once");
                document.form.submit();
            }
        </script>
    </head>

    <body onload="javascript:onloadEvent()">

问题出在后退按钮上,我的页面返回,从上一页提交后,它再次被路由。我无法更改我的上一页,因为它来自另一个应用程序。

PS:我的JSP没有提交按钮。它使用onload()函数提交表单。它是从一个应用程序到另一个应用程序的重定向页面。

0 个答案:

没有答案