加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

通过Ajax实现不显示登录框的IIS-Windows集成身份验证登录

发布时间:2020-12-16 01:52:33 所属栏目:百科 来源:网络整理
导读:script type ="text/javascript" language ="javascript" function Authen() { var location = " http://192.168.0.241/gm ; auth; rId = document.getElementById( username ).value; rName password ).value; // try { // auth = new ActiveXObject('Msxml
<script type="text/javascript" language="javascript">
        function Authen() {
            var location = "http://192.168.0.241/gm;
             auth;
             rId = document.getElementById(username).value;
             rName password).value;
//            try {
//                auth = new ActiveXObject('Msxml2.XMLHTTP');            }            catch (e) {                auth = new XMLHttpRequest();            }

            auth = new XMLHttpRequest();

            auth.open(get,location,false,rId,rName);
            auth.send();

            switch (auth.status) {
                case 200:
                    window.location.href  location;
                    break;
                401:
                    alert(用户名或密码错误);
                    default:
                    alert(auth.status);
            }
        }

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读