dcsimg

How can I detect the screen resolution from JavaScript?

John Zukowski

Ask the screen object:

<script language=javascript>
document.write("Screen Resolution: ",
    screen.width," x ",screen.height)
</script>