我知道你比较喜欢自己写的 这个部分
/****************************************************************\
JScript Asp Call 客户端

作者 : Lostinet[迷失网络]
Email : [email protected]

需要 : JScript 常用运行库
\****************************************************************/
function JacClient(jacurl,funcCallBack,context)
{
function ThrowError(msg)
{
throw(new Error(-1,msg));
}

function Param(node)
{
var type=node.getAttribute("type");
var arrFunc={
string:ParamString,
number:ParamNumber,
boolean:ParamBoolean,
variant:ParamVariant,
rs:ParamRS
}
if(typeof(arrFunc[type])=="undefined")
ThrowError("Server返回错误的数据类型:"+type);
return arrFunc[type](node.getAttribute("name"));
}
function ParamString(name)
{
var obj=
{
name:name,
toNode:function(node,value){
node.setAttribute("name",name);
node.setAttribute("type","string");
if(typeof(value)!="undefined")
node.text=String.Convert(value);
},
fromNode:function(node){
if(node.getAttribute("type")!="string")
ThrowError("不对应的数据类型"+node.getAttribute("type"));
return node.text;
}
};
return obj;
}
function ParamNumber(name)
{
var obj=
{
name:name,
toNode:function(node,value){
node.setAttribute("name",name);
node.setAttribute("type","number");
if(typeof(value)!="undefined")
node.text=String.Convert(value);
},
fromNode:function(node){
if(node.getAttribute("type")!="number")
ThrowError("不对应的数据类型"+node.getAttribute("type"));
return parseFloat(node.text);
}
};
return obj;
}
function ParamBoolean(name)
{
var obj=
{
name:name,
toNode:function(node,value){
node.setAttribute("name",name);
node.setAttribute("type","boolean");
if(typeof(value)!="undefined")
node.text=Boolean.Convert(value).ToString();
},
fromNode:function(node){
if(node.getAttribute("type")!="boolean")
ThrowError("不对应的数据类型"+node.getAttribute("type"));
return Boolean.ConvertFromString(node.text);
}
};
return obj;
}
function ParamVariant(name)
{
var obj=
{
name:name,
toNode:function(node,value){
node.setAttribute("name",name);
node.setAttribute("type","rs");
if(typeof(value)!="undefined")
node.text=Object.Encode(value);
},
fromNode:function(node){
if(node.getAttribute("type")!="variant")
ThrowError("不对应的数据类型"+node.getAttribute("type"));
return Object.DecodeJScript(node.text);
}
};
return obj;
}
function ParamRS(name)
{
var obj=
{
name:name,
toNode:function(node,value){
node.setAttribute("name",name);
node.setAttribute("type","rs");
if(typeof(value)!="undefined")
{
var rs=value;
var xd=new ActiveXObject("Microsoft.XMLDOM");
rs.save(xd,1);
node.text=xd.xml
}
},
fromNode:function(node){
if(node.getAttribute("type")!="rs")
ThrowError("不对应的数据类型"+node.getAttribute("type"));
var xd=new ActiveXObject("Microsoft.XMLDOM");
xd.loadXML(node.text);
if(xd.parseError.errorCode)return null;
var rs=new ActiveXObject("ADODB.Recordset");
rs.Open(xd);
return rs;
}
}
return obj;
}


var async=Boolean.Convert(funcCallBack);
if(async&&typeof(funcCallBack)!="function")
ThrowError("JacClient第二个参数指定时,必须为回调函数");
var xh=(function(){
var xh=new ActiveXObject("Microsoft.XMLHTTP");
if(async)
{
xh.onreadystatechange=function(){
if(xh==null||xh.readyState!=4)return;
xh.onreadystatechange=new Function();
var x=xh;
xh=null;
funcCallBack(CreateJacClient(x),jacurl,context);
}
}
xh.open("GET",jacurl,async);
xh.send("");
return xh;
})();
if(async)
{
xh=null;
return;
}
var lc=CreateJacClient(xh);
xh=null;
return lc;
function CreateJacClient(xh)
{
var xd=new ActiveXObject("Microsoft.XMLDOM");
xd.loadXML(xh.responseXML.xml);
var oJacClient={};
try
{
if(xd.parseError.errorCode)ThrowError("xd-error:"+xd.parseError.reason);
if(xd.documentElement.tagName=="fault")ThrowError(xd.documentElement.xml);

var nlMethod=xd.selectNodes("jac/method");
for(var i=0;i<nlMethod.length;i++)
{
var nMethod=nlMethod.item(i);
AppendMethod();
}
xd=nlMethod=nMethod=null;
}
catch(x)
{
x.description="不能加载JacClient:\n"+x.description;
if(async)return null;
throw(x);
}
return oJacClient;

function AppendMethod()
{
var mName=nMethod.getAttribute("name");
if(Boolean.IsFalse(isNaN(parseInt(mName+"1"))))
ThrowError("WebMethod定义错误:Method名字"+mName+"不合法")
var mAction=nMethod.getAttribute("action");
oJacClient[mName]=CreateMethod();
function CreateMethod()
{
var collRequest=CreateParams("request");
var collResponse=CreateParams("response");
function CreateParams(name)
{
var n=nMethod.selectSingleNode(name);
var nl=n.selectNodes("param");
var arr=[];
for(var i=0;i<nl.length;i++)
{
arr[i]=Param(nl.item(i));
}
return arr;
}
Method.RequestXML="";
Method.ResponseXML="";
Method.Response=null;
return Method;
function Method()
{
return CreateCall(false).Invoke(Array.ConvertArguments());
}
function Method.CreateCall(func)
{
var oCall=CreateCall(true);
if(func)oCall.SetCallBack(func);
return oCall;
}
function Method.valueOf(){return Method.toString();}
function Method.toString(){
return "[JacMethod(Name=\""+mName+"\")]";
}
function CreateCall(async)
{
var dbgXmlRequest="";
var dbgXmlResponse="";

var isReady=false;
var isCalled=false;
var xh=null;
var funcCallBack=new Function();
var xdr=null;
return Call;

function onreadystatechange()
{
if(xh==null||xh.readyState!=4||isReady)return;
isReady=true;
xh.onreadystatechange=new Function();
RecieveData();
}

function RecieveData()
{
xdr=new ActiveXObject("Microsoft.XMLDOM");
xdr.loadXML(xh.responseXML.xml);
xh=null;
if(funcCallBack)
funcCallBack(Call);
funcCallBack=null;
}
function Get()
{
if(xdr.parseError.errorCode)
ThrowError("调用JacMethod\n"+Method+"\n发生错误:xmldoc.parseError.reason\n"+xdr.parseError.reason);
if(xdr.documentElement.tagName=="fault")
ThrowError("调用JacMethod\n"+Method+"\n返回错误:服务器信息:\n"+xdr.documentElement.text);
if(xdr.documentElement.tagName!="response")
ThrowError("调用JacMethod\n"+Method+"\n发生错误:\nroot.tagName必须是response");
var nlParam=xdr.documentElement.selectNodes("param");
if(nlParam.length!=collResponse.length)
ThrowError("调用JacMethod\n"+Method+"\n发生错误:\n返回的个数为:"+nlParam.length);
var res=[];

res.valueOf=res.toString=function(){throw(new Error(-1,"Jac的返回值对象是一个集合,不允许非明确的值调用"))};

for(var i=0;i<collResponse.length;i++)
{
var nParam=nlParam.item(i);
var oParam=collResponse[i];

if(nParam.getAttribute("name")!=oParam.name)
ThrowError("调用JacMethod\n"+Method+"\n发生错误:\n返回的参数的名字"+nParam.getAttribute("name")+"和SARC定义的名字"+oParam.name+"不一致");

res[i]=res[oParam.name]=oParam.fromNode(nParam);
}
Method.ResponseXML=xdr.xml;
Method.Response=res;
//alert("接收:\n\n"+xdr.xml);
return res;
}

解决方案 »

  1.   

    function Send(args)
    {
    if(collRequest.length!=args.length)
    ThrowError(Method+"\n只匹配"+collRequest.length+"个参数");
    var xd=new ActiveXObject("Microsoft.XMLDOM");
    xd.loadXML("<request/>");
    var xde=xd.documentElement;
    xde.setAttribute("name",mName);
    for(var i=0;i<args.length;i++)
    {
    var nParam=xd.createElement("param");
    xde.appendChild(nParam);
    var oParam=collRequest[i];
    oParam.toNode(nParam,args[i]);
    }
    xh.open("POST",mAction,Boolean.Convert(async));
    Method.RequestXML=xd.xml
    //alert("发送:\n\n"+xd.xml);
    xh.send(xd);
    }
    function Call()
    {
    return Call.Invoke(Array.ConvertArguments());
    }
    function Call.GetMethod()
    {
    return Method;
    }
    function Call.Invoke(args)
    {
    if(async&&isCalled)
    ThrowError("Method.CreateCall()返回的异步调用接口只能调用一次");
    xh=new ActiveXObject("Microsoft.XMLHTTP");
    if(async)xh.onreadystatechange=onreadystatechange;
    Send(args);
    isCalled=true;
    if(async)
    return Call;
    RecieveData();
    return Get();
    }
    function Call.GetResponse()
    {
    return Get();
    }
    function Call.GetXML()
    {
    return xdr.xml;
    }
    function Call.GetIsReady()
    {
    return isReady;
    }
    function Call.SetCallBack(func)
    {
    if(typeof(func)!="function")
    ThrowError(func+"不是一个函数");
    funcCallBack=func;
    }
    }
    }
    }
    }
    }
      

  2.   

    我以前把C改成NTFS,结果DOS下安装操作系统也只认D,还好我都经常备份[注:硬盘全是备份垃圾:(]
      

  3.   

    呵呵,我前天还把我的c盘格式话的时候,硬盘出错,居然把后面的d盘自己合并到了c盘一起,结果用了er恢复了8g数据
    还好我的efghi没有被删除
    否则我真的要哭了
    80g数据呢
      

  4.   

    我推荐大家在格式化硬盘的时候用
    sfdisk
    这个工具可以不对其他分区进行操作进行单独的c区进行分区和格式化,
    包括可以格式化出ntfs格式
    我现在一直用这个工具
      

  5.   

    :)
    谢谢flashsoft2000(FS2K) 
    那些东西我的网站上也保留的。可是我丢失的不是这些啊。。555
    我的密码也很多不记得了。(这下惨了,可能要重新做人!)
    很多来了上海才写的东西也没有了。
      

  6.   

    你的代码写得很漂亮,以后会更漂亮,格都格了。要是能恢复的话最好了。
    另外我也一直用SFDISK这东西,真想自己做个,可力量不足,准备再学四年ASM看看
      

  7.   

    有个软件叫做EasyRecovery Professional Edition 5.10好像可以恢复一些,我用过,能恢复一部分,但是有些恢复过去就根本没法子用了,而且不支持中文文件名。
      

  8.   

    有没有人知道XP Pro装什么杀毒软件好呢?
    NAV7.61企业版和NAV2003都装不上。
      

  9.   

    好恐怖,我这就刻盘去。我第一次装linux的时候也有类似经历……
      

  10.   

    下回在装好系统时,用GHOST作个备份
      

  11.   

    以后在格式化硬盘为NTFS格式时最好要GHOSTH一份分区表,这样会好些。
      

  12.   

    回复人: Lostinet(迷失网络)(大家注意∶他不是人)(ΔΔΔΔΔ) ( ) 信誉:100  2002-11-11 16:15:00  得分:0 
     
     
      有没有人知道XP Pro装什么杀毒软件好呢?
    NAV7.61企业版和NAV2003都装不上。
      
     
    先打一个 Patch,在 Symentec 的官方网站上应该有,然后再装 NAV761.
      

  13.   

    我第一次装linux的时候是在做毕业设计的时候,把所有的盘全部给格掉了,结果……………………,哎!