CopyCode The Code is as follows: <SCRIPT type = "text/JavaScript">
/* Detailed method 1 */
Function checkbrowser ()
{
VaR APP = navigator. appname;
VaR verstr = navigator. appversion;
// Firefox
If (App. indexof ('netscape ')! =-1)
{
Alert ("you are using the Netscape or Firefox browser. ");
}
Else if (App. indexof ('Microsoft ')! =-1)
{
If (verstr. indexof ("MSIE 3.0 ")! =-1 | verstr. indexof ("MSIE 4.0 ")! =-1 | verstr. indexof ("MSIE 5.0 ")! =-1 | verstr. indexof ("MSIE 5.1 ")! =-1)
{
Alert ("you are using a browser earlier than ie6.0 .");
}
Else
{
Alert ("you are using ie6.0 or later browsers .");
}
}
}
/* Concise method 2 */
Function checkbrowser1 ()
{
If (window. Navigator. useragent. indexof ("MSIE")> = 1)
// If the browser is IE
{
Alert ("IE browser ");
}
Else // If the browser is Firefox
{
If (window. Navigator. useragent. indexof ("Firefox")> = 1)
{
Alert ("fixfox Browser ");
}
}
}
// Call
Checkbrowser ();
Checkbrowser1 ();
</SCRIPT>
JavaScript to obtain client information Copy code The Code is as follows: Document. Write ("Screen Resolution :")
Document. Write (screen. Width + "*" + screen. Height)
Document. Write ("<br/> ")
Document. Write ("available view area :")
Document. Write (screen. availwidth + "*" + screen. availheight)
Document. Write ("<br/> ")
Document. Write ("color depth :")
Document. Write (screen. colordepth)
Document. Write ("<br/> ")
Document. Write ("buffer depth :")
Document. Write (screen. bufferdepth)
Document. Write ("<br/> ")
Document. Write ("devicexdpi :")
Document. Write (screen. devicexdpi)
Document. Write ("<br/> ")
Document. Write ("deviceydpi :")
Document. Write (screen. deviceydpi)
Document. Write ("<br/> ")
Document. Write ("logicalxdpi :")
Document. Write (screen. logicalxdpi)
Document. Write ("<br/> ")
Document. Write ("logicalydpi :")
Document. Write (screen. logicalydpi)
Document. Write ("<br/> ")
Document. Write ("fontsmoothingenabled :")
Document. Write (screen. fontsmoothingenabled)
Document. Write ("<br/> ")
Document. Write ("pixeldepth :")
Document. Write (screen. pixeldepth)
Document. Write ("<br/> ")
Document. Write ("updateinterval :")
Document. Write (screen. updateinterval)
Document. Write ("<br/> ")