饼子天空  
个人程序Blogs

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>AAAAAAAAAA</title>
 <%
 dim InstId
 InstId = Request.QueryString("instId")
  %>
   
</head>
<body>

<script type="text/javascript">
    window.onload = init;
    function init() {
        var instId = "<%=InstId%>";
        var currentDomain = document.domain;
        var dom = createXmlDomFromFile("pwd.xml");//自定义的方法
        var path = "Root/List[InstId=" + "'" + instId + "']";
        var userName = "";
        var pwd = "";
        if (GetNodeValue(dom, path + "/InstId")) {
            if (GetNodeValue(dom, path + "/InstId") != "") {
                userName = GetNodeValue(dom, path + "/UserName");
                pwd = GetNodeValue(dom, path + "/PassWord");
                var url = "https://" + currentDomain + "/login.asp?instid=" + instId + "&login=" + userName + "&pwd=" + pwd;
                window.navigate(url);
            } else {
                alert("your instid is not belongs to ");
            }
        } else {
        alert("your instid is not belongs to ");
        }
    }
   
    </script>
</body>
</html>

 

pwd.xml

<?xml version="1.0" encoding="utf-8" ?>
<Root>
  <List>
    <InstId>AAA</InstId>
    <UserName>123</UserName>
    <PassWord>123</PassWord>
  </List>
  <List>
    <InstId>BBB</InstId>
    <UserName>123</UserName>
    <PassWord>123</PassWord>
  </List>
</Root>

posted on 2010-06-03 10:16  饼子天空  阅读(175)  评论(0编辑  收藏  举报