问个问题:如何根据访访客操作系统语言,跳转到指定的页面或者在网页输出“错误”。。万分感分!~!~在线等回复
解决方案 »
- 求个结尾允许为空的正则!
- jQuery+ajax如何实现动态多个form的无刷新文件上传
- jquery.colorbox怎样把小图放大?
- JS刷新父窗体的问题
- 两个不同页面在 Tab 间切换
- 如何用execCommand 执行 new window命令,对应参数是什么
- 提问:有关history.back()#######################
- 请教高手!javascript出什么错误时发出警示音??(分不够继续加!)
- 如何让一个textbox变灰色?
- 有没有知道“开始”-“程序”中的“程序”的注册表键值是在哪里?
- javascript生成table
- 请大家帮忙,产品分类显示的问题!!
<HEAD>
<STYLE>
@media all {
MSIE\:clientCaps {behavior:url(#default#clientcaps);}
}
</STYLE>
你可以学一下这个
<HEAD>
<STYLE>
@media all {
MSIE\:clientCaps {behavior:url(#default#clientcaps);}
}
</STYLE>
<SCRIPT>
function window.onload()
{
var bDataBindingAvailable = false;
var sDataBindingVersion = '';
var sDataBindingID =
"{333C7BC4-460F-11D0-BC04-0080C7055A83}";
bDataBindingAvailable =
oClientCaps.isComponentInstalled(sDataBindingID,"clsid");
// if data binding is unavailable, install it
if (!bDataBindingAvailable)
{
oClientCaps.addComponentRequest (sDataBindingID,
"componentid");
bDataBindingAvailable = oClientCaps.doComponentRequest();
}
:
}
</SCRIPT>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
:
<MSIE:CLIENTCAPS ID="oClientCaps" />
:
</BODY>
这是安装组件
<HEAD>
<STYLE>
@media all {
IE\:CLIENTCAPS {behavior:url(#default#clientCaps)}
}
</STYLE>
<SCRIPT>
function window.onload()
{
sTempStr = "availHeight = " + oClientCaps.availHeight + "\n" +
"availWidth = " + oClientCaps.availWidth + "\n" +
"bufferDepth = " + oClientCaps.bufferDepth + "\n" +
"colorDepth = " + oClientCaps.colorDepth + "\n" +
"connectionType = " + oClientCaps.connectionType + "\n" +
"cookieEnabled = " + oClientCaps.cookieEnabled + "\n" +
"cpuClass = " + oClientCaps.cpuClass + "\n" +
"height = " + oClientCaps.height + "\n" +
"javaEnabled = " + oClientCaps.javaEnabled + "\n" +
"platform = " + oClientCaps.platform + "\n" +
"systemLanguage = " + oClientCaps.systemLanguage + "\n" +
"userLanguage = " + oClientCaps.userLanguage + "\n" +
"width = " + oClientCaps.width + "\n" ;
oPre.innerText = sTempStr;
}
</SCRIPT>
</HEAD>
<BODY>
<H1>clientCaps Behavior Sample</H1>
<IE:CLIENTCAPS ID="oClientCaps" />
<PRE id="oPre"></PRE>
</BODY>
</HTML>
这是他们给加的ie语言判断代码<%@ LANGUAGE="VBScript.Encode" CodePage="65001"%>
<%Response.Buffer=True
Server.ScriptTimeout=90
On Error Resume Next
dbfolder="database/"
dbname="venshop.mdb"
connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(dbfolder&dbname)
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open connstr
If Err Then
set fs=createobject("scripting.filesystemobject")
set ts=fs.createtextfile(server.MapPath("Error/data_"&month(now())&"-"&day(now())&"_"&hour(now())&"-"&minute(now())&"-"&second(now())&".txt"),true)
ts.write Err.Number&":"&Err.Description
ts.close
set ts=Nothing
set fs=Nothing
err.Clear
Set Conn = Nothing
Response.Write "<p style='font-size:9pt' align=center>Database Error.</p>"
Response.End
End If
if request("my")="yes" then
Response.Cookies("venshop")("my")="yes"
end ifiel=Lcase(Request.ServerVariables("HTTP_ACCEPT_LANGUAGE"))
if iel="zh-cn" and Request.Cookies("venshop")("my")="" then
Response.Write "<p style='font-size:9pt' align=center>Error!</p>"
Response.End
end if%><!--#include file="config.asp"-->让他们加系统语言判断。他们说没有你能帮我加下吗
帮忙加下,我对这个不熟悉。