易截截图软件、单文件、免安装、纯绿色、仅160KB

asp 截取文件扩展名

我有一个文件名  aaa.bbb.rar或者a.b.c.d.html或者aa.b.dd.shtml
我怎样截取文件的后缀名呀。。。
<%
aa="aaa.bbb.rar"
bb=split(aa,".")
response.write bb(ubound(bb))
%>

修改一下楼上的代码。
VBScript code:
<%
aa="aaa.bbb.rar"
bb=split(aa,".")
if ubound(bb)=0 then
response.write ""
else
response.write trim(bb(ubound(bb)))
end if
%>


s = "F:\aaa\xxx.aaa.txt"
Response.Write("文件名: " & Mid(s, InStrRev(s, "\") + 1, Len(s) - InStrRev(s, "\")))
Response.Write("文件后缀: " & Mid(s, InStrRev(s, ".") + 1, Len(s) - InStrRev(s, ".")))

http://www.bhcode.net/article/20080721/1820.html

path="aaa.bbb.rar"
kzname=split(path,".")(ubound(split(path,".")))

VBScript code:
path="aaa.bbb.rar"
kzname=split(path,".")(ubound(split(path,".")))



相关问答:

asp初学问题。response找不到

<%@language="vbscript"%>
<%option explicit%>
<html>
<head> <title>xxx </title> </head>
<script language=vbs>
'注意变量 ......

asp中用javascript动态改变Image的src的路径问题

<form id="form1" runat="server">
  <div>
  <script type="text/javascript">
  function oo(a){
  document.getEleme ......

ASP判断的问题,郁闷了!判断不出来!

HTML code:

dim jf
set conn=server.createobject("adodb.connection")
connstr="Driver={Sql Server};Server="&Sqlip&";Database="&Sqldb&";Uid="& ......

求改一个ASP小程序加上传功能和下载功能。。

文件:folder.inc
HTML code:

<%
Dim folderini,pos,pageName
fPath = Request.ServerVariables("PATH_TRANSLATED")
pos = instrRev(fPath,"\")
folderini = Left(fPath,pos)+&qu ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号