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所显示的是相对 ......
一、正则表达式概述
如果原来没有使用过正则表达式,那么可能对这个术语和概念会不太熟悉。不过,它们并不是您想象的那么新奇。
请回想一下在硬盘上是如何查找文件的。您肯定会使用 ? 和 * 字符来帮助查找您正寻找的文件。? 字符匹配文件名中的单个字符,而 * 则匹配一个或多个字符。一个如 'data?.dat' 的模式可 ......
自动识别IP,并跳转到来访问者所在的城市
先去下一个最新的纯真IP数据库,然后按如下操作:
1.运行纯真QQIP数据库里带的ShowIP.exe,点解压,输入文件名,比如IP.txt,确定,就得到一个TXT文件。
2.打开ACCESS,工具-自定义,命令选项卡,把导入选项拖动到上面的工具栏。
3.建库,建一个表,四个字段
Startip 类型:文 ......
asp中插入与修改数据的几种方式。为了方便解说,我们先建立一个名为test的表,表内只有两个数据
项:username和email,分别用来存储用户名与邮箱地址。
1.利用insert语句插入数据:
insert是sql语句的基本指令之一, 用法很简单,这里我只将其基本格式列出.
代码如下:
set conn=s ......