asp上传文件代码
add.html
<html>
<head>
<title>无组件上传</title>
</head>
<body>
<form method="POST" name="myform" action="xSave.asp" target="_self">
<input name="PicPath" type="text" id="PicPath" readonly="true">
<input name="sPicPath" type="hidden" id="sPicPath">
<iframe id="Upload" src="upload.html" frameborder=0 scrolling=no width="100%" height="20"></iframe>
<img src="" id="objimg" style="display:none;" />
</form>
</body>
</html>
upload.html
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<SCRIPT language=javascript>
function check_file()
{
var strFileName=form.FileName.value;
if (strFileName=="")
{
alert("请选择要上传的文件");
return false;
}
}
</SCRIPT>
</head>
<body leftmargin="0" topmargin="0">
<form action="upfile.asp" method="post" name="form1" enctype="multipart/form-data">
<input name="FileName" type="FILE" class="tx1" size="20" onChange="window.parent.document.getElementById('objimg').src=this.value;window.parent.document.getElementById('objimg').style.display='';">
<input type="submit" name="Submit" value="上传">
</form>
</body>
</html>
upfile.asp
<!--#include file="upload.asp"-->
<%
Const MaxFileSize=2048 '上传文件大小限制单位k
Const UpFileType="gif|jpg|bmp|png" '允许的上传文件类型
set fs=createobject("scripting.filesystemobject")
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<%
call upload_0() '使用化境无组件上传类
%>
</body>
</html>
<%
sub upload_0() '使用化境无组件上传类
set upload=new upload_file '建立上传对象
&n
相关文档:
<Html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>生成Word文档</title>
</head>
<script ......
前两天,客户需要添加下拉菜单,我晕的很,很简单的一个问题把我诱导了两三天,后来醒悟过来,真想打自己。
之前我也使用过div套div的方法,只要控制他们的位置就可以了,但这次我没有,使用的在表格式套div,自己琢磨了半天,已经忘记了div所显示的是相对 ......
一、Request 对象
可以使用 Request 对象访问任何基于 HTTP 请求传递的所有信息,包括从 HTML 表格用 POST 方法或 GET 方法传递的参数、cookie 和用户认证。
Request[.集合|属性|方法](变量)
1、Form
Form 集合通过使用 POST 方法的表格检索邮送到 HTTP 请求正文中的表格元素的值。
Request.Form(element)[(i ......
这个模板引擎比较方便,跟HTML结合了
Class template
Private c_Char, c_Path, c_FileName, c_Content, c_PageUrl, c_CurrentPage, c_PageStr, ReplacePageStr
Private TagName
' ***************************************
' 设置编码
' ***************************************
Public Property Let Char( ......
如何令你的网站“动感十足”
您的网站是否仍一如既往地保持“静态”?目前呈几何增长的互联网网站中,有相当一部分仍固守“静态”,无形中已大大落后于时代的步伐。所谓“静态”指的就是网站的网页内容“固定不变”,当用户浏览器通过互联网的HTTP(Hypertext Transpor ......