怎样才可以把客户端一个程序指定的文件上传到服务端? 不知道,也许用APPLET对文件操作 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我现在想采用xmlhttp来实现,客户端主要的函数如下:var ado_stream = new ActiveXObject("ADODB.Stream"); var xml_dom = new ActiveXObject("MSXML2.DOMDocument"); xml_dom.loadXML('<?xml version="1.0" ?><root/>'); xml_dom.documentElement.setAttribute("xmlns:dt", "urn:schemas-microsoft-com:datatypes"); var l_node1 = xml_dom.createElement("file1"); l_node1.dataType = "bin.base64"; ado_stream.Type = 1; // 1=adTypeBinary ado_stream.Open(); ado_stream.LoadFromFile("c:\\test.doc"); l_node1.nodeTypedValue = ado_stream.Read(-1); // -1=adReadAll ado_stream.Close(); xml_dom.documentElement.appendChild(l_node1); var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); alert("dd"); xmlhttp.open("POST","receivefile.jsp",false); xmlhttp.send(xml_dom); alert(xmlhttp.ResponseText);但我现在不知道在receivefile.jsp怎么来获取通过xmlhttp发送过来的数据? 如何用HIBERNATE调用存储过程 poi读excle问题 请高手帮我看下为什么我的JSP文件无法调用js文件中的方法.谢谢 jsp验证码IE加载慢 jsp调用bean出错,高手指教! 为什么在局域网中无法访问网页 为什么tomcat不能启动? 高手接招,谢谢! tomcat4.18执行时出现的错误!请高手指点! 关于jsp的异常处理问题 为什么把bean的scope设为session会出现invalid handle的错误? 一个关于框架结构的问题!!!
var ado_stream = new ActiveXObject("ADODB.Stream");
var xml_dom = new ActiveXObject("MSXML2.DOMDocument");
xml_dom.loadXML('<?xml version="1.0" ?><root/>');
xml_dom.documentElement.setAttribute("xmlns:dt", "urn:schemas-microsoft-com:datatypes"); var l_node1 = xml_dom.createElement("file1");
l_node1.dataType = "bin.base64"; ado_stream.Type = 1; // 1=adTypeBinary
ado_stream.Open();
ado_stream.LoadFromFile("c:\\test.doc"); l_node1.nodeTypedValue = ado_stream.Read(-1); // -1=adReadAll
ado_stream.Close();
xml_dom.documentElement.appendChild(l_node1); var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
alert("dd");
xmlhttp.open("POST","receivefile.jsp",false);
xmlhttp.send(xml_dom); alert(xmlhttp.ResponseText);
但我现在不知道在receivefile.jsp怎么来获取通过xmlhttp发送过来的数据?