if ( typeof test == 'undefined' ) 
    var test = {};

test.getIEVersion = function() {
    var myAgent = navigator.userAgent;
    var result = myAgent.match( /MSIE\s(\d{1,2}\.\d{1})/i );
    var retString = "";
    if ( result == null ) {
        retString = "none";
    }
    else {
        retString = result[1];
    }

    return retString;
};

alert(test.getIEVersion());



저작자 표시
신고
posted by 뚱2