String hostname = DNS. gethostname (); // obtain the host name <br/> IPaddress [] Addresslist = DNS. gethostbyname (hostname ). addresslist; // obtain the IP list </P> <p> httpbrowsercapabilities BC = request. browser; </P> <p> // lab_info is used to display the obtained information. <br/> lab_info.text = "" + "<br> "; <br/> lab_info.text + = "Host Name:" + hostname + "<br>"; <br/> lab_info.text + = "IP :"; <br/> for (INT I = 0; I <Addresslist. length; I ++) <br/> lab_info.text + = Addresslist. getvalue (I ). tostring () + "<br>"; <br/> lab_info.text + = "<br>" + "Operating System:" + BC. platform + "<br>"; <br/> lab_info.text + = "whether it is a Win16 system:" + BC. win16 + "<br>"; <br/> lab_info.text + = "whether it is a Win32 system:" + BC. win32 + "<br>"; <br/> lab_info.text + = "--- <br>"; </P> <p> lab_info.text + = "browser:" + BC. browser + "<br>"; <br/> lab_info.text + = "browser ID:" + BC. ID + "<br>"; <br/> lab_info.text + = "browser version:" + BC. version + "<br>"; <br/> lab_info.text + = "browser majorversion:" + BC. majorversion. tostring () + "<br>"; <br/> lab_info.text + = "browser minorversion:" + BC. minorversion. tostring () + "<br>"; <br/> lab_info.text + = "Whether the browser is a test version:" + BC. beta. tostring () + "<br>"; <br/> lab_info.text + = "is America Online Browser:" + BC. AOL + "<br>"; <br/> lab_info.text + = "client installed. net Framework Version: "+ BC. clrversion + "<br> ";// Even if the. NET Framework is installed, if it is not an IE browser, all versions of the test are 0.0. <Br/> lab_info.text + = "whether it is a search engine web crawler:" + BC. crawler + "<br>"; <br/> lab_info.text + = "whether it is a mobile device:" + BC. ismobiledevice + "<br>"; <br/> lab_info.text + = "--- <br>"; </P> <p> lab_info.text + = "displayed color depth: "+ BC. screenbitdepth + "<br>"; <br/> lab_info.text + = "approximate width of Display (in characters):" + BC. screencharacterswidth + "<br>"; <br/> lab_info.text + = "the approximate height of the display (measured in characters):" + BC. screencharactersheight + "<br>"; <br/> lab_info.text + = "display approximate width (in pixel behavior units):" + BC. screenpixelswidth + "<br>"; <br/> lab_info.text + = "Approximate height (in pixel behavior units):" + BC. screenpixelsheight + "<br>"; <br/> lab_info.text + = "--- <br>"; </P> <p> lab_info.text + = "whether CSS is supported: "+ BC. supportscss + "<br>"; <br/> lab_info.text + = "whether ActiveX control is supported:" + BC. activexcontrols. tostring () + "<br>"; <br/> lab_info.text + = "supported javaapplets:" + BC. javaapplets. tostring () + "<br>"; <br/> lab_info.text + = "Support for javascript:" + BC. javaScript. tostring () + "<br>"; <br/> lab_info.text + = "jscriptversion:" + BC. jscriptversion. tostring () + "<br>"; <br/> lab_info.text + = "Support for VBScript:" + BC. VBScript. tostring () + "<br>"; <br/> lab_info.text + = "whether cookies are supported:" + BC. cookies + "<br>"; <br/> lab_info.text + = "supported Dom versions of mshtml:" + BC. msdomversion + "<br>"; <br/> lab_info.text + = "supported W3C Dom versions:" + BC. w3cdomversion + "<br>"; <br/> lab_info.text + = "Support for receiving XML via http:" + BC. supportsxmlhttp + "<br>"; <br/> lab_info.text + = "supported framework:" + BC. frames. tostring () + "<br>"; <br/> lab_info.text + = "Maximum length of href value in hyperlink A:" + BC. maximumhreflength + "<br>"; <br/> lab_info.text + = "table supported:" + BC. tables + "<br> ";
The namespace of httpbrowsercapabilities is: system. Web.
Addresslist