window.navigator 对象包含有关访问者浏览器的信息。
navigator没有统一的标准,因此各个浏览器都有自己不同的navigator版本。
appCodeName -- 浏览器代码名的字符串表示
appName -- 官方浏览器名的字符串表示
appVersion -- 浏览器版本信息的字符串表示
cookieEnabled -- 如果启用cookie返回true,否则返回false,可以判断用户浏览器是否开启cookie
javaEnabled -- 如果启用java返回true,否则返回false
platform -- 浏览器所在计算机平台的字符串表示
plugins -- 安装在浏览器中的插件数组
taintEnabled -- 如果启用了数据污点返回true,否则返回false
userAgent -- 用户代理头的字符串表示,包含浏览器版本等信息的字符串
<script type="text/javascript">
var x = navigator;
document.write("CodeName=" + x.appCodeName);
document.write("<br />");
document.write("MinorVersion=" + x.appMinorVersion);
document.write("<br />");
document.write("Name=" + x.appName);
document.write("<br />");
document.write("Version=" + x.appVersion);
document.write("<br />");
document.write("CookieEnabled=" + x.cookieEnabled);
document.write("<br />");
document.write("CPUClass=" + x.cpuClass);
document.write("<br />");
document.write("OnLine=" + x.onLine);
document.write("<br />");
document.write("Platform=" + x.platform);
document.write("<br />");
document.write("UA=" + x.userAgent);
document.write("<br />");
document.write("BrowserLanguage=" + x.browserLanguage);
document.write("<br />");
document.write("SystemLanguage=" + x.systemLanguage);
document.write("<br />");
document.write("UserLanguage=" + x.userLanguage);
</script>
分享到:
相关推荐
window.navigator用来反映浏览器及其功能信息的对象。 // 检测浏览器版本信息 function getBrowserInfo(){ var Sys = {}; var ua = window.navigator.userAgent.toLowerCase(); var re =/(msie|firefox|chrome...
window.navigator 对象包含有关访问者浏览器的信息。 Window Navigator window.navigator 对象在编写时可不使用 window 这个前缀。 实例 txt = “ 浏览器代号: ” + navigator.appCodeName + “ “; txt+= “ ...
NAVIGATOR —提供对window.navigator对象的访问 NETWORK_INFORMATION —提供对window.navigator.connection对象的访问 USER_AGENT提供对window.navigator.userAgent字符串的访问 PERFORMANCE —提供对window....
• navigator • screen • window o history o location o frames[]; Frame o document anchors[]; links[]; Link applets[] embeds[] forms[]; Form Button Checkbox elements...
很明显,这个API就是允许mobile...在window.navigator对象里就只有一个关于振动的API:vibrate。 振动API基础应用 这个navigator.vibrate函数可以接受一个数字参数,也可以接受一个数字数组,当使用数组参数时,奇
7. navigator 获取浏览器相关信息 8. 弹窗 DOM (文档对象模型) DOM 分类 DOM对象 Document文档对象 element文档对象 DOM事件操作 鼠标事件 键盘事件 触屏事件 特殊事件 表单事件 浏览器兼容处理 兼容性写法,封装...
本技巧简要说明了如何在window.navigator对象中更改用户代理或任何其他数据。
jquery 转储插件 在弹出窗口中显示转储结果使您可以: ... "window.navigator" /* optional label */ ) ; // dump element selected by the jQuery selector $ ( "#element" ) . dump ( ) ; // same as $ . dump ( $
并不是这样的,如果此时点击链接、输入网址进入另一个页面,或者开启新的窗口,你会发现,window.navigator.webdriver这个对象又变成true了,所以这样并非根治。但是本文,提到的设置内容能够有效根治网上的一大堆...
使用和从调用获取音频输出,方法是 , , , , 或其他对象或数据类型,请参阅 。 安装 添加以下脚本标签 < script type =" text/javascript " src =" ...
电池对象是存放在window.navigator.battery里,但因为这是火狐浏览器首次实现并提供这个接口,并未普及,你需要使用window.navigator.mozBattery这种写法。这个mozBattery对象有下列属性: 1.charging: 表示当前电池...
目前,它会将window.navigator和window.clientInformation对象包装为伪装插件和mime类型,类似于在Firefox和IE中的做法。 计划的未来功能:*能够为指定站点添加例外(很快)•减少window.navigator和http User-Agent...
目前,它会将window.navigator和window.clientInformation对象包装为伪装插件和mime类型,类似于在Firefox和IE中的做法。 计划的未来功能:*能够为指定站点添加例外(很快)•减少window.navigator和http User-Agent...
2.11.2 arguments 对象..............................................53 2.11.3 Function 类..............................................54 2.11.4 闭包..............................................56 ...
4.一个浏览器窗口中的DOM顺序是:window->(navigator,screen,history,location,document) 5.得到表单中元素的名称和值:document.getElementById("表单中元素的ID號").name(或value) 6.一个小写转大写的JS: document....
BOM窗口尺寸页面跳转历史弹窗计时器Cookie存储浏览器信息window.navigator Browser Object Model Js通过浏览器对象模型(BOM)来和浏览器进行交互,可以获取屏幕尺寸,窗口大小,页面地址,历史记录等浏览器相关信息...