ie下如何获得事件源对象

    document.body.onclick = function(e){
        e = e || window.event;
        t = e.target || e.srcElement;
        var url = t.href;
        load_page(url);
    };
    window.onload = function(){
        load_page(location.href);
    };
    
    function load_page(url){
        url = url || location.href;
        if(url.indexOf('#')>-1){
            document.getElementById('mark').style.display = 'block';
        }
    }

 

你可能感兴趣的:(IE)