网址是http://61.175.135.177/search/new_search/search_list.asp?
我想在delphi中自动完成提交功能,可无效,哪位高人帮忙瞧瞧,代码如下:
var m:tstringlist;
mm:tstringstream;
begin
idhttp1.Request.ContentType :='application/x-www-form-urlencoded';
idhttp1.HandleRedirects :=true;
m:=tstringlist.Create ;
mm:=tstringstream.create('');
m.add('JZX_NO=TGHU4534249');
idhttp1.Post('http://www.insightsoft.cn',m,mm);
showmessage(mm.datastring);//只显示箱号提交的表单,未执行查询
mm.free;m.free
我想在delphi中自动完成提交功能,可无效,哪位高人帮忙瞧瞧,代码如下:
var m:tstringlist;
mm:tstringstream;
begin
idhttp1.Request.ContentType :='application/x-www-form-urlencoded';
idhttp1.HandleRedirects :=true;
m:=tstringlist.Create ;
mm:=tstringstream.create('');
m.add('JZX_NO=TGHU4534249');
idhttp1.Post('http://www.insightsoft.cn',m,mm);
showmessage(mm.datastring);//只显示箱号提交的表单,未执行查询
mm.free;m.free
解决方案 »
- 日期查询问题
- 恭喜95有了小95
- 在社区打开帖子时看不到帖子内容和回复,但并没有显示找不到服务器和无法显示,是怎么回事,只有我一个人有这种情况吗
- 关于数据库排序的写法
- delphi怎么通过注册表键值方式连接数据库
- 怎么判断当前的是一个子目录还是一个文件?
- 怎样让delphi 调用chm帮助文件
- delphi6中Dcomconnection控件是否有问题,为什么我做的程序在运行时报错。
- 有谁知道delphiX控件中dxplay的用法,最好有源码
- delphi中如何直接连接到SQL Server?请高手赐教
- DataMoule中引用MainForm的一个控件,是在DataMouleUnit的uses后面加上:MainFormUnit吗?
- StringGrid编辑状态如何让文字换行
http://blog.china-pub.com/more.asp?name=fangerhua&id=26937
procedure TForm1.Button1Click(Sender: TObject);
var
m:tstringlist;
mm:tstringstream;
MutPartForm: TIdMultiPartFormDataStream;
begin
MutPartForm := TIdMultiPartFormDataStream.Create;
try
IdHTTP1.Get('http://61.175.135.177/search/new_search/search_list.asp');
MutPartForm.AddFormField('JZX_NO','TGHU4534249');
MutPartForm.AddFormField('button','此处不知道你button值多少');
memo1.Text := IdHTTP1.Post('http://61.175.135.177/search/new_search/search_list.asp',MutPartForm);
finally
MutPartForm.Free;
end;
end;
<td height="22"> 船名:
<input name="SHIP_NAME" type="text" class="textfield2" id="SHIP_NAME3" value="1" size="14">
</td>
<td>船舶英文名称:
<input name="SHIP_NAME_EN" type="text" class="textfield2" id="SHIP_NAME4" value="1" size="14"></td>
<td> AddFormField('SHIP_NAME', 船名);
出差中,没有Delphi给不了你例子你看一下网页的HTML代码 <input name=就是你所要写的内容
感觉可能是你那个页面asp查询代码处理参数的问题,最好让我能看到你提交本页来查询的sql处理代码(即点击查询所处理的事)
var
v:olevariant;
url:string;
begin
url:=''http://61.175.135.177/search/new_search/search_list.asp?jzx_no=TGHU4534249';
webbrowser1.Navigate(url);
while webbrowser1.readystate<>4 do application.ProcessMessages;
v:=webbrowser1.oleobject.document.all.item('button',0);
v.Click;//开始查询 就能显示查询的结果了
end;
var m:tstringlist;
Response:tstringstream;
url:string;
begin
url:='http://61.175.135.177/search/new_search/search_list.asp';
m:=tstringlist.Create ;
Response:=tstringstream.Create('');
m.add('IE_FLAG=E&SHIP_NAME=&SHIP_NAME_EN=&FLIGHT_NO=&JZX_NO=TGHU4534249&JC_DATE_B=&JC_DATE_E=&SHIP_UN_NO=&BILL_NO=&button=%BF%AA%CA%BC%B2%E9%D1%AF&button=');
idhttp1.Request.ContentType :='application/x-www-form-urlencoded';
idhttp1.Post(url,m,Response);
memo1.Text :=Response.DataString ;
m.free;
Response.free;