รหัสทดสอบ
http://jsbin.com/dipijeqi/11
ผล:
โครเมี่ยม
การคัดลอกรหัสมีดังนี้:
window.devicepixelratio: 2 (แม่นยำ)
Screen.devicexdpi / screen.logicalxdpi: NAN
window.outerwidth / window.innerWidth: 2
document.documentelement.offsetheight / window.innerHeight: 0.020618556701030927 (มีความสัมพันธ์)
window.top.outerwidth / window.top.innerwidth: 2
FF
การคัดลอกรหัสมีดังนี้:
window.devicepixelratio: 1.5 (แม่นยำ)
Screen.devicexdpi / screen.logicalxdpi: NAN
window.outerwidth / window.innerWidth: 1.011458333333333333333333333
document.documentelement.offsetheight / window.innerHeight: 0.023391812865497075 (มีสหสัมพันธ์)
window.top.outerwidth / window.top.innerwidth: 1.01145833333333333333333333
เช่น 8
การคัดลอกรหัสมีดังนี้:
window.devicepixelratio: undefined
Screen.devicexdpi / screen.logicalxdpi: 1.54166666666666667 (ประมาณแม่นยำ)
window.outerwidth / window.innerWidth: NAN
document.documentelement.offsetheight / window.innerHeight: NAN
window.top.outerwidth / window.top.innerWidth: NAN
IE11
การคัดลอกรหัสมีดังนี้:
window.devicepixelratio: 1.5 (แม่นยำ)
Screen.devicexdpi / screen.logicalxdpi: 1.5
window.outerwidth / window.innerWidth: 1.0084033613445377
document.documentelement.offsetheight / window.innerHeight: 0.02203856749311295 (มีความสัมพันธ์)
window.top.outerwidth / window.top.innerwidth: 1.008403361344537777777777
IE10
การคัดลอกรหัสมีดังนี้:
window.devicepixelratio: undefined
Screen.devicexdpi / screen.logicalxdpi: 1.5 (แม่นยำ)
window.outerwidth / window.innerWidth: 1.0084033613445377
document.documentelement.offsetheight / window.innerHeight: 1
window.top.outerwidth / window.top.innerwidth: 1.008403361344537777777777
IE9
การคัดลอกรหัสมีดังนี้:
window.devicepixelratio: undefined
Screen.devicexdpi / screen.logicalxdpi: 1.5 (แม่นยำ)
window.outerwidth / window.innerWidth: 1.0084033613445377
document.documentelement.offsetheight / window.innerHeight: 1
window.top.outerwidth / window.top.innerwidth: 1.008403361344537777777777
360 6.3 (ไม่มีการตอบสนองเลย)
การคัดลอกรหัสมีดังนี้:
window.devicepixelratio: undefined
Screen.devicexdpi / screen.logicalxdpi: 1
window.outerwidth / window.innerWidth: NAN
document.documentelement.offsetheight / window.innerHeight: NAN
window.top.outerwidth / window.top.innerWidth: NAN
เบราว์เซอร์ความเร็ว 360
การคัดลอกรหัสมีดังนี้:
window.devicepixelratio: 1
Screen.devicexdpi / screen.logicalxdpi: NAN
window.outerwidth / window.innerWidth: 1.5
document.documentelement.offsetheight / window.innerHeight: 0.015267175572519083
window.top.outerwidth / window.top.innerWidth: 1.5 (แม่นยำ)
เบราว์เซอร์ความเร็วสูง Sogou (ไม่มีการตอบสนองเลย)
การคัดลอกรหัสมีดังนี้:
window.devicepixelratio: undefined
Screen.devicexdpi / screen.logicalxdpi: 1
window.outerwidth / window.innerWidth: NAN
document.documentelement.offsetheight / window.innerHeight: NAN
window.top.outerwidth / window.top.innerWidth: NAN
เบราว์เซอร์ Taobao
การคัดลอกรหัสมีดังนี้:
window.devicepixelratio: 1
Screen.devicexdpi / screen.logicalxdpi: NAN
window.outerwidth / window.innerWidth: 2.0710059171597632 (แม่นยำประมาณ)
document.documentelement.offsetheight / window.innerHeight: 0.022988505747126436
window.top.outerwidth / window.top.innerwidth: 2.0710059171597632