• js 获取 焦点的元素 兼容 ie 火狐 safari 等


        function hidet(e) {

            var aa = document.activeElement;

            if (window.event) {             aa = document.activeElement;         } else {             aa = e.explicitOriginalTarget;         }

           // alert(aa.parentNode.id);

            if (aa.parentNode.id == 'resume_manage') {

                   } else {

                alert("sdddddddddddddddddddddddddddd");         }            }

          var currentNode;

                var currentParent;

                if (window.ActiveXObject) {
                    currentNode = document.activeElement;
                    currentParent = currentNode.parentNode;
                } else {
                currentNode = e.explicitOriginalTarget;

                if (currentNode == undefined) {
                    currentNode = e.relatedTarget;
                }
                if (currentNode != null && currentNode != undefined && currentNode.parentNode !=null  && currentNode.parentNode !=undefined)
                    currentParent = currentNode.parentNode;
                
                }


                if (currentParent == null || currentParent == undefined || currentParent.id != spanControl.id) {
                    spanControl.style["display"] = "none";
                    currrentTD = "";
                    spanControl = "";
                    checkboxname = "";
                }

  • 相关阅读:
    Xcode9新特性介绍-中文篇
    基于Mac制作iPhone铃声教程,iTunes定制铃声
    浅谈Swift和OC的区别
    Your password has expired. To log in you must change it using a client that supports expired passwords.
    浅谈测试驱动开发(TDD)
    ClientAbortException: java.net.SocketException: 断开的管道
    nohup top & 问题: top: failed tty get
    rsync 学习
    myeclipse项目 不能打开
    ChannelSftp 远程下载目录
  • 原文地址:https://www.cnblogs.com/yangfeizbj/p/3023649.html
Copyright © 2020-2023  润新知