Team:Korea U Seoul/temp

From 2012.igem.org

(Difference between revisions)
Line 2: Line 2:
<head>
<head>
<script type="text/javascript">
<script type="text/javascript">
-
var Browser = {a : navigator.userAgent}
+
function getUserAgent() {
-
function whatIsThis(){alert(Browser.a);}
+
      userAgent = new String(navigator.userAgent);
 +
      var versionStr = "none";
 +
  if(userAgent.search("Mozilla/4.0") > -1) {
 +
      versionStr = "Mozilla/4.0";
 +
      alert(versionStr);
 +
  } else {
 +
      versionStr = "What is yout UA?";
 +
      alert(versionStr);
 +
  }
 +
}
 +
</script>
</script>
</head>
</head>
-
<body>
+
<body onload="getUserAgent();">
-
<input type="button" value="브라우저 체크" onclick="javascript:whatIsThis();" />
+
    Hi! Your Web Browser Information:
</body>
</body>
</html>
</html>

Revision as of 17:42, 26 September 2012

Hi! Your Web Browser Information: