请教如何提取浏览器发来的一组(check box) 数据?(60分)

C

coca

Unregistered / Unconfirmed
GUEST, unregistred user!
HTML页面使用check box 向CGI提交一组数据,请问如何将他们分开。
我现在使用Request.Content得到的是:ID=2ID=3ID=5
而我需要的得到是: 2,3,5
 
假设xxx是你得到的id=3&id=5&id=4&id=6&id=7
strid:='';
while pos(1,'&',xxx)>0 do
begin
strid:=strid+left(xxx,pos(1,'&',xxx)-1)+',';
xxx:=right(xxx,length(xxx)-pos(1,'&',xxx));
end;
strid:=strid+xxx;
 
假设xxx是你得到的id=3&id=5&id=4&id=6&id=7
strid:='';
while pos(1,'&',xxx)>0 do
begin
strid:=strid+right(left(xxx,pos(1,'&',xxx)-1),length(left(xxx,pos(1,'&',xxx)-1))-3)+',';
xxx:=right(xxx,length(xxx)-pos(1,'&',xxx));
end;
strid:=strid+xxx;
 
:cytown,好快啊
 
接受答案了.
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
D
回复
0
查看
2K
DelphiTeacher的专栏
D
D
回复
0
查看
1K
DelphiTeacher的专栏
D
D
回复
0
查看
2K
DelphiTeacher的专栏
D
顶部