📄 file.htm
字号:
<!--这个源码来自[源码之家-http://Codejia.Com],需要更多精品源码请访问http://Codejia.Com-->
<html>
<head>
<title>文件属性</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../Include/ManageStyle.css" type="text/css">
<script language="JavaScript" src="dialog.js"></script>
<script language="JavaScript">
// 本窗口返回值
function ReturnValue(){
var sFromUrl = GetLink(d_fromurl.value);
dialogArguments.insertHTML(sFromUrl);
window.returnValue = null;
window.close();
}
// 点确定时执行
function ok(){
// 取文件名
GetFileName(d_fromurl.value, "/");
// 返回值
ReturnValue();
}
// 按文件扩展名取图,并产生链接
function GetLink(url){
var sExt;
sExt=url.substr(url.lastIndexOf(".")+1);
sExt=sExt.toUpperCase();
var sPicName;
switch(sExt){
case "TXT":
sPicName = "txt.gif"
break;
case "CHM":
case "HLP":
sPicName = "hlp.gif"
break;
case "DOC":
sPicName = "doc.gif"
break;
case "PDF":
sPicName = "pdf.gif"
break;
case "MDB":
sPicName = "mdb.gif"
break;
case "GIF":
case "JPG":
case "PNG":
case "BMP":
sPicName = "pic.gif"
break;
case "ASP":
case "JSP":
case "JS":
case "PHP":
case "PHP3":
case "ASPX":
sPicName = "code.gif"
break;
case "HTM":
case "HTML":
case "SHTML":
sPicName = "htm.gif"
break;
case "ZIP":
case "RAR":
sPicName = "zip.gif"
break;
case "EXE":
sPicName = "exe.gif"
break;
case "AVI":
case "MPG":
case "MPEG":
case "ASF":
sPicName = "mp.gif"
break;
case "RA":
case "RM":
sPicName = "rm.gif"
break;
case "MID":
case "WAV":
case "MP3":
case "MIDI":
sPicName = "audio.gif"
break;
case "XLS":
sPicName = "xls.gif"
break;
case "PPT":
case "PPS":
sPicName = "ppt.gif"
break;
default:
sPicName = "unknow.gif"
break;
}
return "<img border=0 src='"+GetHttpUrl("sysimage/file/"+sPicName)+"'><a href='"+url+"' target=_blank>"+d_filename.value+"</a>";
}
// 取文件名到隐藏的输入框
function GetFileName(url, opt){
d_filename.value=url.substr(url.lastIndexOf(opt)+1);
}
</script>
</head>
<body bgcolor="menu">
<table border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td><fieldset>
<legend>文件来源</legend>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="9" height="5"></td>
</tr>
<tr>
<td width="7"></td>
<td colspan="5"><input type="text" id="d_fromurl" style="width:236px" size="30" value="http://">
</td>
<td width="7"></td>
</tr>
<tr>
<td colspan="9" height="5"></td>
</tr>
</table>
</fieldset> </td>
</tr>
<tr>
<td height="5"></td>
</tr>
<tr>
<td align="right">
<input type="submit" class="button01-out" value="确定" id="Ok" onclick="ok()">
<input type="button" class="button01-out" value="取消" onclick="window.close();"></td>
</tr>
</table>
<input type="hidden" id="d_filename" value>
</body>
</html>
<span style="display:none;">这个源码来自http://Codejia.Com,更多源码请访问<a href="http://Codejia.Com">http://Codejia.Com</a> <a href="http://9host.cn">虚拟主机</a> <a href="http://15883.com">免费域名</a> <a href="http://bestmoban.com">网页模版</a></span>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -