var str:string;
int:integer;
begin
str:='http://www.csdn.net';
if copy(str,1,pos('/',str))='http:' then showmessage('HTTP协议');
str:='ftp://www.csdn.net';
if copy(str,1,pos('/',str))='ftp:' then showmessage('FTP协议');
end;
int:integer;
begin
str:='http://www.csdn.net';
if copy(str,1,pos('/',str))='http:' then showmessage('HTTP协议');
str:='ftp://www.csdn.net';
if copy(str,1,pos('/',str))='ftp:' then showmessage('FTP协议');
end;
解决方案 »
- 关于函数定义返回已知类的问题?
- delphi 调用c# 2005写的webservice发生错误,help
- 请教各位高手,怎么实现调用CHM帮助的时候,能定位到与当前运行程序功能模块对应的帮助页面,解决立即给分
- 为什么安装完swFlash.ocx后,退出delphi再次进来时,Flash控件消失?
- 怎么样弹出窗体时close自己?
- 如何遍历目录下文件夹
- 请问如何在delphi中进行超连接
- 如何通过IP地址和子网掩码计算网络号等信息
- Delphi资源社区期待您的加入!
- 非常着急:关于在win2000下安装SQL7.0的问题。
- 求教:在程序中创建一个ACCESS表时,如何设定一个文本类型字段的属性为允许空字符串(零长度字符串)??
- 越界!?
若返回为0,表示没有找到
你觉得下面的有什么问题吗,怎么运行时点击没有反应呀
procedure TForm1.Button1Click(Sender: TObject);
var str:string;
begin
str:=edit1.Text;
if copy(str,1,pos('/',str))='http:' then showmessage('HTTP协议'); if copy(str,1,pos('/',str))='ftp:' then showmessage('FTP协议');
end;