Tip: you can modify some code before running
Js determines the user's browser type<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.111cn.net/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>Js determines the user's browser type</title></head><body><div id='browser'></div><script language="javascript">Function getBrowser () {var s = navigator. userAgent. toLowerCase (); var a = new Array ("msie", "firefox", "safari", "opera", "netscape"); for (var I = 0; I <. length; I ++) {if (s. indexOf (a [I])! =-1) {return a [I] ;}return "other" ;}var br = getBrowser (); document. getElementById ('Browser '). innerHTML = br;</script>The original tutorial on this site is reproduced with the source www.111cn.net</body></html>
Tip: you can modify some code before running