How do I get the screen resolution for users who have visited the site?
I would be happy if I could get both browser resolution and screen resolution like you did.
Confirm
http://www.ugtop.com/spill.shtml
As OOPer pointed out, don't you just look at the source without asking a question?
Get screen resolution
<span id="ossize"></span>
<script type="text/javascript">
window_load();
screen.width=window_load;
function window_load(){
varsW,sH,s;
sW = screen.width;
sH = screen.height;
s=sW+"x"+sH+"pix";
document.getElementById("ossize").innerHTML=s;
}
</script>
Browser Resolution Retrieval
<span id="bsize"></span>
<script type="text/javascript">
window_load();
window.onresize=window_load;
function window_load(){
varsW,sH,s;
sW = window.innerWidth;
sH = window.innerHeight;
s=sW+"x"+sH+"pix";
document.getElementById("bsize").innerHTML=s;
}
</script>
As you can see, you need to use JavaScript to retrieve it on your browser, so you need to create a process to send the resulting values to the web server.
© 2024 OneMinuteCode. All rights reserved.