仰天一笑(Ansonxuyu),专业从事软件定制开发、Web软件开发,网站建设,网络推广,APP开发,微博应用开发,微信应用开发,电子商务开发,物联网开发等技术。
互联网8年风雨,愿在此交朋识友,交流心得,分享技术知识(策划/研发/运营/推广/合作)!QQ:943530498


仰天一笑

昨日不悔,今日勿失,明日莫忧! —徐羽

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
<script language="javascript" for="RE_REPAIR_SITE" event="onblur">
            
                    {
                        
return GetHore();
                    }
                  ]]
>
        
</script>
        
<script>
                function GetHore()
                {
            
                
if(document.all("RE_REPAIR_SITE").value != "")
                {        
                
var xml = "<?xml version='1.0' encoding='UTF-8'?>"+
                            
"<Ebanswers>"+
                                
"<SITE>"+
                                    
"<SITE_NO>" + document.all("RE_REPAIR_SITE").value + "</SITE_NO>"+
                                
"</SITE>"+
                            
"</Ebanswers>";
                    
var outHtml = XmlHttpPost("../Library/WebInitPage.aspx?Source=GetHore", xml);
                    
//alert(outHtml);
                    if(outHtml != "")
                    {
                            
try{
                                        
var partHore = Number(outHtml.substr(0,outHtml.indexOf(",")));
                                        
if(partHore != 0 )
                                        {
                                            document.all(
"RE_PART_FEE").value= partHore 
                                        }
                                        
var feeHore = Number(outHtml.substr(outHtml.indexOf(",")+1));
                                        
if(feeHore != 0 )
                                        {
                                            document.all.RE_FEE.value    
= feeHore 
                                        }

                            }
                            
catch(e)
                            {
                            }
                    }
                }
            }




一些基础函数:
function XmlHttpPost(webFile, sendXml) {
var xmlHttp = GetXmlHttp();
xmlHttp.Open("POST", webFile, false);
xmlHttp.SetRequestHeader("Content-Type","text/xml; charset=utf-8");
xmlHttp.Send(sendXml);
return xmlHttp.responseText;
}
function GetXmlHttp() {
if (XmlVersion == -1)
CheckXmlVersion();
if (XmlVersion == 4)
return new ActiveXObject("MSXML2.XMLHTTP.4.0");
return new ActiveXObject("MSXML2.XMLHTTP.3.0");
}
var XmlVersion = -1;
//------------------------------------------------
function CheckXmlVersion() {
XmlVersion = 4;
try {
xmldom = new ActiveXObject("MSXML2.DOMDocument.4.0");
} catch (e) {
XmlVersion = 3;
}
return 0;
posted on 2006-03-08 09:59  仰天一笑  阅读(947)  评论(0编辑  收藏  举报