回復:.net如何判斷瀏覽器的類別?
瀏覽器型號:Request.Browser.Type
瀏覽器名稱:Request.Browser.browser
瀏覽器版本:Request.Browser.Version
瀏覽器Cookie:Request.Browser.Cookies
你的操作系統:Request.Browser.Platform
你的IP地址:Request.UserHostAddress
??
-------------------------------------------
MSN:bdbox@hotmail.com?
請給我與您交流的機會
回復:.net如何判斷瀏覽器的類別?
<script?language="JavaScript"><!--
document.write("瀏覽器名稱:?"+navigator.appName+"<br/>");
document.write("版本號:?"+navigator.appVersion+"<br/>");
document.write("代碼名字:?"+navigator.appCodeName+"<br/>");
//?--></script>
??
-------------------------------------------
MSN:bdbox@hotmail.com?
請給我與您交流的機會
回復:.net如何判斷瀏覽器的類別?
<script?language='javascript'>
function?page()
{
????if(window.navigator.userAgent.indexOf("MSIE")>=1)
{
alert('IE瀏覽器')
????????}
if(window.navigator.userAgent.indexOf("Firefox")>=1)
{
alert('火狐瀏覽器')
}
}
</script>
回復:.net如何判斷瀏覽器的類別?
///?<summary>
///?判斷當前訪問是否來自瀏覽器軟件
///?</summary>
///?<returns>當前訪問是否來自瀏覽器軟件</returns>
public?static?bool?IsBrowserGet()
{
string[]?BrowserName?=?{"ie",?"opera",?"netscape",?"mozilla"};
string?curBrowser?=?HttpContext.Current.Request.Browser.Type.ToLower();
for?(int?i?=?0;?i?<?BrowserName.Length;?i++)
{
if?(curBrowser.IndexOf(BrowserName[i])?>=?0)
{
return?true;
}
}
return?false;
}
?
瀏覽器型號:Request.Browser.Type
瀏覽器名稱:Request.Browser.browser
瀏覽器版本:Request.Browser.Version
瀏覽器Cookie:Request.Browser.Cookies
你的操作系統:Request.Browser.Platform
你的IP地址:Request.UserHostAddress
??
-------------------------------------------
MSN:bdbox@hotmail.com?
請給我與您交流的機會
回復:.net如何判斷瀏覽器的類別?
<script?language="JavaScript"><!--
document.write("瀏覽器名稱:?"+navigator.appName+"<br/>");
document.write("版本號:?"+navigator.appVersion+"<br/>");
document.write("代碼名字:?"+navigator.appCodeName+"<br/>");
//?--></script>
??
-------------------------------------------
MSN:bdbox@hotmail.com?
請給我與您交流的機會
回復:.net如何判斷瀏覽器的類別?
<script?language='javascript'>
function?page()
{
????if(window.navigator.userAgent.indexOf("MSIE")>=1)
{
alert('IE瀏覽器')
????????}
if(window.navigator.userAgent.indexOf("Firefox")>=1)
{
alert('火狐瀏覽器')
}
}
</script>
回復:.net如何判斷瀏覽器的類別?
///?<summary>
///?判斷當前訪問是否來自瀏覽器軟件
///?</summary>
///?<returns>當前訪問是否來自瀏覽器軟件</returns>
public?static?bool?IsBrowserGet()
{
string[]?BrowserName?=?{"ie",?"opera",?"netscape",?"mozilla"};
string?curBrowser?=?HttpContext.Current.Request.Browser.Type.ToLower();
for?(int?i?=?0;?i?<?BrowserName.Length;?i++)
{
if?(curBrowser.IndexOf(BrowserName[i])?>=?0)
{
return?true;
}
}
return?false;
}
?