zoukankan      html  css  js  c++  java
  • 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 = "";
                }

  • 相关阅读:
    CRM
    eclipse 全局替换
    ps 泡泡
    SSH重新登录的问题
    又说oracle spatial 将Geometry转为gml
    其实你可以这样折腾java enum
    Sqlite 多线程入库
    Oracle spatial 将Geometry转换为gml字符串
    Oracle 关于WKT构造SDO_GEOMETRY的问题。
    Lucene之拉框查询
  • 原文地址:https://www.cnblogs.com/yangfeizbj/p/3023649.html
Copyright © 2011-2022 走看看