'javascript OS 버전 체크'에 해당되는 글 1건

  1. 2010.01.04 javascript OS 버전 체크
반응형

<script type="text/javascript">
<!--
 function ttt(){
  var request_os = window.navigator.appVersion;
   var os_array = request_os.split(";");
  //alert("os_array : "+os_array[2]);
  //alert("request_os : "+request_os);
  //alert(document.cookie);
  switch(os_array[2])
 {
    case " Windows NT 6.1" :
        os_version = "Windows7";
        break;
    case " Windows NT 6.0" :
        os_version = "WindowsVista";
        break;
    case " Windows NT 5.1" :
        os_version = "WindowsXP";
        break;
    case " Windows NT 5.0" :
        os_version = "Windows2000";
        break;
    case " Windows NT 4.0" :
        os_version = "WindowsNT";
        break;
    case " Windows 98" :
        os_version = "Windows98";
        break;
    case " Windows 95" :
        os_version = "Windows95";
        break;
 }
 alert("os_version : "+os_version);
 
 }
-->
</script>

<input type="button" onclick="ttt();">

Posted by 1010