public String getName()
Returns the name of the file or directory denoted by this abstract pathname. This is just the last name in the pathname's name sequence. If the pathname's name sequence is empty, then the empty string is returned. Returns:
The name of the file or directory denoted by this abstract pathname, or the empty string if this pathname's name sequence is empty
Returns the name of the file or directory denoted by this abstract pathname. This is just the last name in the pathname's name sequence. If the pathname's name sequence is empty, then the empty string is returned. Returns:
The name of the file or directory denoted by this abstract pathname, or the empty string if this pathname's name sequence is empty
解决方案 »
- 请教下JS如何写Json格式的链接
- 向高手求一个导航型的css代码。如图。
- 关于使用AJAX JQ JSON的一些问题
- 如何用js的函数控制checkbox是否被选中
- 怎麼..打開子窗口再而鎖定父窗口,,而關閉子窗口刷新父窗口????
- 请教:google map api3:如何实现最佳视野内坐标,类似百度地图API的:setViewport
- 如何实现当鼠标悬在链接上,会显示提示性的信息?
- 求救,在线等待,立刻给分(ie5.5以上版本)
- xml高手请进...
- node mongoose populate 方法的小问题
- 这个网页对话框的参数怎样获取?在先等!
- fason无限下拉关菜单的问题,(修改问题)
function UpLoadForm_Validator(pUpLoadForm)
{
if(document.all.UpLoadFile.value=="")
{
window.confirm("请选择上传的文档!");
pUpLoadForm.UpLoadFile.focus();
return false;
}
var strFileFormat=pUpLoadForm.UpLoadFile.value.match(/^(.*)(\.)(.{1,8})$/)[3];//检查上传文件格式
strFileFormat=strFileFormat.toUpperCase();
if(strFileFormat=="DOC"||strFileFormat=="DOT")
{
}
else
{
window.confirm("只能上传.Doc和.Dot,请重新选择!");
return false;
}
return true;
}
</script>
<form method="POST" enctype="multipart/form-data" action="" onsubmit="return UpLoadForm_Validator(this)" laguage="JavaScript" name="UpLoadForm">
<input type="file" name="UpLoadFile" style="visibility:hidden;">
<input type=button onclick="UpLoadFile.click();">
<input type="submit" value="上传" name="UpLoadButton">
</form>
Dim fso, f, f1, fc, s
Set fso = CreateObject("Scripting.FileSystemObject")
if not fso.FolderExists(folderspec) then
response.write "该目录不存在!"
response.end
end if
Set f = fso.GetFolder(folderspec)
'----------获得子文件夹----
Set fc = f.SubFolders
For Each f1 in fc
s = s &"<img src='../image/folder.gif'><a href='serdownload.asp?myPath="& folderPath & "\"& f1.name &"'>" & f1.name &"</a>"
s = s & "<BR><BR>"
Next '-----------获得文件-------
Set fc = f.Files
For Each f2 in fc
s = s &"<img src='../image/"&GetIcon(f2.name)&"'><a href='../download"& folderPath &"/" &f2.name &"'>"& f2.name &"</a>"
s= s &" ("& Round(f2.size/1024000,2) &"M"&")"
s = s & "<BR>"
Next
ShowFolderList = s
End Function
如果是file类,可以直接得到filename,有方法的
如果是string,截字符串吧!最后一个“.”是扩展名,这个“.”前面第一个“\”是文件名,连一起就行了