使用xmlhttp 实现多文件上传[1]

[入库:2005年8月18日] [更新:2007年3月25日]

本文简介:选择自 xkou 的 blog

 

如今xml技术渐渐成熟,成为了一种网站传播数据的又一种方式,下面是我用xmlhttp写的一个多文件上传程序.包括客户端和服务端两部分..

本程序的实现是利用xml可以在其结点存放经base64编码的二进制文件,先在客户端生成包含要传文件的xml ,通过xmlhttp发送到服务端.下面是客户端:

<html>

<!--

xmlupload.htm by 九天神龙

http://www.5ucode.com

xkou@hotmail.com

//-->

<meta  http-equiv=content-type content="text/html; charset=gb2312">

<title>xml上传客户端</title>

提交到asp页面<input type=text id="postto" size="30"

value="http://localhost/up.asp"

/><br>

上传到服务器路径<input value="\"

type=text id="postpath" onblur="if(this.value.charat(this.value.length-1)!='\\') this.value+='\\';"  /><br>

设定文件上传数:<input type=text value=5 size=5 id="upnum"> &nbsp;<button onclick=displayform(parseint(upnum.value));>设定</button>

本文关键:使用xmlhttp 实现多文件上传
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top