js onbeforunload

    window.onbeforeunload = function(event){
        event = window.event || event;
        var currentObj = event.srcElement || event.target;
        var cc = currentObj.activeElement;
        for(var p in cc){
            if(typeof(cc[p]) != "function"){
                alert(p+":"+ cc[p]);
            }
        } 
        return "333";
    }

你可能感兴趣的:(java)