我的网站应如何控制上传图片时"打开"对话框的格式

来源:百度知道 编辑:UC知道 时间:2024/05/21 16:30:30
我是做网站的,asp+access,上传图片的框用的是这个代码:<input type="file" name="file1" value="" size="26"> 在外面会出现一个"选择文件"对话框,我想让这个对话框的文件类型默认是:图片(*gif,*.jpg)而不是所有文件(*.*).我该怎么控制?我的油箱:wss8910@163.com QQ:89293748,小女子拜谢.

这是很久以前做的了 你参考一下吧

<!--#include FILE="upload.inc"-->

<html>
<head>
<title>文件上传</title>
<script language="JavaScript">
<!-- Hide from older browsers...

//Function to add pic
function Addpic(imagePath){
window.opener.frames.message.focus();
window.opener.frames.message.document.execCommand('InsertImage', false, imagePath);
window.close();
}

// -->
</script>
</head>
<LINK href=site.css rel=stylesheet>

<%

dim upload,file,formName,formPath,iCount,filename,fileExt
set upload=new upload_5xSoft ''建立上传对象

formPath=upload.form("filepath")
''在目录后加(/)
if right(formPath,1)<>"/" then formPath=formPath&"/"
response.write "<BODY bgColor=menu topmargin=15 leftmargin=15 ><br>&q