一、瀏覽器版本
1.js判斷
2..NET判斷
二、屏幕大小和文檔大小
1.js判斷
2..NET判斷
二、屏幕分辨率
1.js判斷
screen.width
screen.height
2..NET判斷
HttpBrowserCapabilitiesBase bc = Request.Browser; ViewBag.Swidth = bc.ScreenPixelsWidth.ToString(); ViewBag.Sheight = bc.ScreenPixelsHeight.ToString();
附:通過Js來獲取所有屏幕適配的總結
http://blog.csdn.net/qq_16559905/article/details/50474199
"屏幕分辨率為:"+screen.width+"*"+screen.height
"屏幕可用大小:"+screen.availWidth+"*"+screen.availHeight
"網頁可見區域寬:"+document.body.clientWidth
"網頁可見區域高:"+document.body.clientHeight
"網頁可見區域寬(包括邊線的寬):"+document.body.offsetWidth
"網頁可見區域高(包括邊線的寬):"+document.body.offsetHeight
"網頁正文全文寬:"+document.body.scrollWidth
"網頁正文全文高:"+document.body.scrollHeight
"網頁被卷去的高:"+document.body.scrollTop
"網頁被卷去的左:"+document.body.scrollLeft
"網頁正文部分上:"+window.screenTop
"網頁正文部分左:"+window.screenLeft
"屏幕分辨率的高:"+window.screen.height
"屏幕分辨率的寬:"+window.screen.width
"屏幕可用工作區高度:"+window.screen.availHeight
"屏幕可用工作區寬度:"+window.screen.availWidth
