页面打开后延时1秒自动提交表单问题.为何老是重复提交?
<scripttype="text/javascript">functionsubmitForm(){document.getElementById("form1").s...
<script type="text/javascript">
function submitForm(){
document.getElementById("form1").submit();
}
</script>
<script type="text/javascript">
window.onload = function page_cg() {
setTimeout("a()", 1000);
}
function a() {
submitForm();
}
</script>
jsp页面中在线等
<body style="margin:0px auto;padding:0px;overflow: auto;" onload="page_cg();" >
<script type="text/javascript">
function submitForm(){
document.getElementById("form1").submit();
}
</script>
<script type="text/javascript">
function page_cg() {
setTimeout("a()", 1000);
}
function a() {
submitForm();
}
</script>
这样写也是重复提交啊 展开
function submitForm(){
document.getElementById("form1").submit();
}
</script>
<script type="text/javascript">
window.onload = function page_cg() {
setTimeout("a()", 1000);
}
function a() {
submitForm();
}
</script>
jsp页面中在线等
<body style="margin:0px auto;padding:0px;overflow: auto;" onload="page_cg();" >
<script type="text/javascript">
function submitForm(){
document.getElementById("form1").submit();
}
</script>
<script type="text/javascript">
function page_cg() {
setTimeout("a()", 1000);
}
function a() {
submitForm();
}
</script>
这样写也是重复提交啊 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询