javascript:var agent=window.navigator;var s=[];var color;for(p in agent){if(p=="userAgent"){color="#f00";}else{color="#000";}s.push("<span style='color:"+color+"'>"+p+":"+eval("agent."+p)+"</span>");}s.sort();s= s.join("<br />");document.write(s);
效果:
appCodeName:Mozilla
appMinorVersion:0
appName:Microsoft Internet Explorer
appVersion:4.0 (compatible; MSIE 7.0; Windows NT 5.1)
cookieEnabled:true
cpuClass:x86
mimeTypes:
onLine:true
opsProfile:null
platform:Win32
plugins:
systemLanguage:zh-cn
userLanguage:zh-cn
userProfile:null
userAgent:Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)