标题: 新手请教 [打印本页] 作者: rexuekonglong 时间: 2008-12-2 19:09 标题: 新手请教 2) int web_submit_data ( const char *StepName,//页面文件名
<List of attributes>,
ITEMDATA,//Item数据
<List of data>,
[ EXTRARES, <List of Resource Attributes>,]
LAST );
这个函数以GET and POST requests发送form。
*StepName:
In the following example, the web_submit_data function submits a form using the POST method:
web_submit_data("customerinfo.asp",
"Action=http://lazarus/webflight/customerinfo.asp",
"Method=POST",
"TargetFrame=",
"EncType=multipart/www-urlencoded"
"RecContentType=text/html"
ITEMDATA,
"name=flight", "value=6593", ENDITEM,
"name=reserveFlight", "value=Next >",ENDITEM,
LAST);
这是java、JavaScript使用POST方法发送form的例子
lrapi.web.submit_data("Finder.asp",
"Action=http://mercury/library/Finder.asp",
new String[]{ //options[]
"Method=POST",
"RecContentType=text/html",
"Referer=http://mercury/library/finder.asp",
"Mode=HTML"
},
new String[]{ //data[]
"Name=BookTitle", "Value=Mansfield Park", lrapi.web.ENDITEM,
"Name=AuthorBook", "Value=Austen, Jane", lrapi.web.ENDITEM,
lrapi.web.LAST
});