关于javascript的navigator.userLanguage问题,谢谢
以下这个代码为什么得到用户语言的是zh-cn,而我用的英文版的IE8,我想应该得到en才对啊,谢谢
JScript code:
function getlanguage(){
var lan=navigator.userLanguage;
}
userLanguage Property
Retrieves the operating system's natural language setting.
Syntax
[ sLanguage = ] object.userLanguagePossible Values
sLanguage String that receives any of the possible return values listed in the Language Codes.
The property is read-only. The property has no default value.
Remarks
This property reflects the setting in the "Your locale (location)" box in the Regional Options of Control Panel—for example, "English (United States).
Standards Information
There is no public standard that applies to this property.
Applies To
clientInformation, navigator, Navigator Constructor
See Also
browserLanguage, systemLanguage
sLanguage String chinese wholesalersreceives any of the possible return values listed in the Language Codes.
The property is read-only. The property has no default value.
i got it,thank you for your help
相关问答:
如何实现当鼠标悬停控件上时,出现该控件的尾部显示对应的层,鼠标移动到该层上进行相应的操作,当鼠标移除时(不在控件上也不在层上)层隐藏,
HTML code:
<html>
<head>
<meta http-equiv= ......
问题描述:有一个下拉列表框,内容如下:添加、删除、更新。有这三个选项。
用户A登录的时候有添加、删除、更新三个权限。
用户B登录的时候只有更新权限。
我想判断,假如 A登录所有选项都显示(是可见的)。
......
三个数x,y,z 比大小..
var x,y,z,t;
if (x>y)
{t=x;x=y;y=t;} //交换x,y的值
if(x>z)
{t=z;z=x;x=t;}//交换x,z的值
if(y>z)
{t=y;y=z;z=t;}//交换z,y的值
这是 ......
如题,已实现连接,发送。未实现实异步接收,请高手指点。最好有完整的例子
javascript请求通信是基于http的,它只是一种运行在浏览器端的脚本语言,不能使用socket,
唯一的解决办法就是写ActiveX插件.
要实现异步 ......
随着浏览器安全性的提高,要实现图片预览也越来越困难。
不过群众的智慧是无限的,网上也有很多变通或先进的方法来实现。
在研究了各种预览方法后,作为总结,写了这个程序,跟大家一起分享。
上次写的简便无刷新 ......