日期:2014-05-18  浏览次数:20913 次

关于自动提交
我想要个功能,就是页面第一次加载的时候要提交一个form  
不知道如何处理,请各位达人帮忙看看.
顶者有分.

------解决方案--------------------
<body onload= "document.form1.submit() ">
<form name= "form1 " id= "form1 ">

</form>
</body>
------解决方案--------------------
上面写错了,修改如下:
<body onload= "go() ">
<form name= "form1 " id= "form1 ">

</form>
<script>
function go()
{
if (document.cookie.indexOf( 'submited= ') == -1)
{
document.cookie = "submited=1 ";
document.form1.submit();
}
}
</script>
</body>
------解决方案--------------------
<body onload= "document.main.submit() ">
<form name= "main " method= "post " action= "aa.htm " target= "_blank ">
</form>
</body>