自动提交表单 200

这个HTML怎么自动提交表单,请问:<html><head><title>自动提交表单</title></head><label>帐户名:</label><inputty... 这个HTML怎么自动提交表单,请问:

<html>
<head><title>自动提交表单</title></head>

<label>帐户名:</label>
<input type="text" style="" tabindex="1" maxlength="32" value="aaaaaa" size="32" name="TPL_username" class="login

-text J_UserName"/>
</div>
<div class="field">
<label>密   码:</label>
<input type="password" tabindex="2" size="32" value="ddddddd" maxlength="20" id="TPL_password" name="TPL_password"

class="login-text"/>
<button value="" tabindex="3" type="submit">提    交</button>

</body>
</html>
展开
 我来答
a540522604
2009-12-14 · TA获得超过434个赞
知道小有建树答主
回答量:410
采纳率:0%
帮助的人:261万
展开全部
方法一:

< html>
< head>
< title> Untitled Document< /title>
(1)自动提交表单:
< meta http-equiv=" Content-Type" content=" text/html; charset=gb2312" >
< /head>
< script language=javascript>
setTimeout(" document.form1.submit()" ,10000)
< /script>
< body bgcolor=" #FFFFFF" text=" #000000" >
< form name=" form1" method=" post" action=" pp.asp" >
< p>
< input type=" text" name=" textfield" >
< /p>
< p>
< input type=" text" name=" textfield2" >
< /p>
< /form>
< /body>
< /html>

10秒后提交。
---------------------------------------------------------------------------------------------------------
方法二:
我想打开一页a.htm时定时以表单形式向服务器b.htm提交数据,就好像申请100个邮箱,可以实现么?
---------------------------------------------------------------

< form name=" form1" >
< /form>
< script>
setInterval(" document.all.form1.submit()" ,5000)
< /script>

5秒一次!
---------------------------------------------------------------

1.xmlhttp
2.< form action=" " name=frm1 target=_blank method=post>
< /form>
< script>
setTimeout(" frm1.submit(); " ,3000);
< /script>

QQ:9231333

http://www.yy66.net
---------------------------------------------------------------

采用 window.setInterval和window.clearInterval 操作,比如下面脚本就是这样实现:

< script language=" Javascript" >
var FormOBJ=document.forms[" FormName" ];
var SOBJ;

//设置自动提交最大次数
var Max=100;

//表单提交函数
function submitForm()
{
if (FormOBJ&& Max> 0)
{
FormOBJ.action=" b.htm" ; //提交到的页面
FormOBJ.target=" _blank" ; //用新窗口处理提交
FormOBJ.submit(); //执行提交
Max--;
}
else
submitInt();
}

//中断自动提交函数
function submitInt()
{
if (SOBJ)
{
window.clearInterval(SOBJ);
Max=100;
}
}

//开始自动提交函数
function submitStart()
{
//设置每秒钟提交表单一次
SOBJ=window.setInterval(" submitForm()" ,1000);
}
< /script>
cbkiller_0
2009-12-15 · TA获得超过118个赞
知道答主
回答量:290
采纳率:0%
帮助的人:0
展开全部
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<conio.h>

struct contacks
{ char name[10];
char street[20];
char city[10];
int eip;
char state[10];
}con[50];
int k=0;

void enter();
void display();
void lookandchange();
void del();
void save();

void main()
{
int a;
do
{

printf("\n\n ******************************************************************\n");
printf(" *"); printf("\t\twelcome enter the contacks system"); printf("\t*");
printf("\n ******************************************************************\n");

printf(" *"); printf("\t 1.Access information"); printf("\t\t\t\t\t*\n");
printf(" *"); printf("\t 2.display information"); printf("\t\t\t\t*\n");
printf(" *"); printf("\t 3.lookandchange information"); printf("\t\t\t\t*\n");
printf(" *"); printf("\t 4.Delete information"); printf("\t\t\t\t\t*\n");
printf(" *"); printf("\t 5.Save the information"); printf("\t\t\t\t*\n");
printf(" *"); printf("\t 6. exit "); printf("\t\t\t\t\t*\n");
printf(" ******************************************************************\n");

printf(" Enter you choice : ");
scanf("%d",&a);

switch(a)
{

case 1:printf("\n");enter();break;
case 2:printf("\n");display();break;
case 3:printf("\n");lookandchange();break;
case 4:printf("\n");del();break;
case 5:printf("\n");save();break;
case 6:printf("\n");exit(0);break;
default:printf("\nThe choice is between 1 to 6.\n");
}
}while(a!=0);

}

void enter()
{
char ch[20];

printf("\nenter student information:\n");
do
{ printf("\nname: ");
scanf("%s",con[k].name);
printf("street: ");
scanf("%s",con[k].street);
printf("\ncity: ");
scanf("%s",con[k].city);
printf("\neip: ");
scanf("%d",&con[k].eip);
printf("\nstate: ");
scanf("%s",con[k].state);
k++;
printf("\nif want continue input student information(y/n): ");
scanf("%s",ch);
}while(strcmp(ch,"y")==0||strcmp(ch,"Y")==0);
display();
}

void display()
{ int i;
printf(" the information is:\n");
for(i=0;i<k;i++)
{ printf("%10s %20s %10s %6d %10s ",con[i].name,con[i].street,con[i].city,con[i].eip,con[i].state);
printf("\n"); }
}

void lookandchange()

{
int i;
char a[20],ch[10];
printf("\nenter you want look name:");
scanf("%s",a);
for(i=0;i<k;i++)
if(strcmp(con[i].name,a)==0) printf("%10s %20s %10s %6d %10s ",con[i].name,con[i].street,con[i].city,con[i].eip,con[i].state);
printf("\nenter you want change name:");
scanf("%s",a);
for(i=0;i<k;i++)
{
if(strcmp(con[i].name,a)==0)
{ printf("\nyou sure want change student name(y/n): ");
scanf("%s",ch);
if(strcmp(ch,"y")==0||strcmp(ch,"Y")==0) { printf("\nname:"); scanf("%s",con[i].name);}
printf("\nyou sure want change street(y/n): ");
scanf("%s",ch);
if(strcmp(ch,"y")==0||strcmp(ch,"Y")==0) { printf("\nstreet"); scanf("%s",con[i].street);}
printf("\nyou sure want change city(y/n): ");
scanf("%s",ch);
if(strcmp(ch,"y")==0||strcmp(ch,"Y")==0) { printf("\ncity"); scanf("%s",con[i].city);}
printf("\nyou sure want change eip(y/n): ");
scanf("%s",ch);
if(strcmp(ch,"y")==0||strcmp(ch,"Y")==0) { printf("\neip"); scanf("%d",&con[i].eip);}
printf("\nyou sure want change state(y/n): ");
scanf("%s",ch);
if(strcmp(ch,"y")==0||strcmp(ch,"Y")==0) { printf("\nstate"); scanf("%s",con[i].state);}
}
}
display();
}

void del()
{
int i,j;
char c[20];
printf("\nenter you want delete name :\n");
printf("name:");
scanf("%s",&c);
for(i=0;i<k;i++)
if(strcmp(c,con[i].name)==0) break;
for(j=i;j<=2;j++)
con[j]=con[j+1];
printf("\t\t\tyou had delete %s\n",c);
k--;
display();
}

void save()
{ FILE *fp; int i;
if((fp=fopen("xinxi.txt","w"))==NULL)
{ printf("cannot write the file.\n");
exit(0);}
for(i=0;strlen(con[i].name)!=0;i++)
fprintf(fp,"%s %s %s %d %s\n",con[i].name,con[i].street,con[i].city,con[i].eip,con[i].state);
fclose(fp);
}

在vc++中调试通过 有问题可以hi我
你的第六个load功能 既然有第一个enter了 第六个就没必要了
在第三个中你还可以修改信息
虽然没用到链表 但功能均可实现
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式