不知道,也许用APPLET对文件操作

解决方案 »

  1.   

    我现在想采用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发送过来的数据?