private String getVersionName() throws Exception
{
// 获取packagemanager的实例
PackageManager packageManager = getPackageManager()
// getPackageName()是你当前类的包名,0代表是获取版本信息
PackageInfo packInfo = packageManager.getPackageInfo(getPackageName(),0)
String version = packInfo.versionName
return version
}
获取当前系统的版本号:
textView.setText("Product Model: " + android.os.Build.MODEL + ","
+ android.os.Build.VERSION.SDK + ","
+ android.os.Build.VERSION.RELEASE)
var browser=navigator.appNamevar b_version=navigator.appVersion
var version=parseFloat(b_version)
document.write("浏览器名称:"+ browser)
document.write("<br />")
document.write("浏览器版本:"+ version)
更多
document.write("<p>浏览器:")document.write(navigator.appName + "</p>")
document.write("<p>浏览器版本:")
document.write(navigator.appVersion + "</p>")
document.write("<p>代码:")
document.write(navigator.appCodeName + "</p>")
document.write("<p>平台:")
document.write(navigator.platform + "</p>")
document.write("<p>Cookies 启用:")
document.write(navigator.cookieEnabled + "</p>")
document.write("<p>浏览器的用户代理报头:")
document.write(navigator.userAgent + "</p>")
以前看到过记下的,不知道好不好使。你试试,正好我看看好不好使