is there any way to know extends screen in javascript?
by screen.availWidth
and screen.availHeight
you can only know the width and height just for the main screen
is there any way to know extends screen in javascript?
by screen.availWidth
and screen.availHeight
you can only know the width and height just for the main screen
If you are referring to how to detect extended screens (on two monitors), and your browser window is going on both screens, you can detect with the following code:
var extendedScreen = ( window.innerWidth > screen.availWidth );
But the code above won't work if the browser width is less than the available width of the screen. I don't know of a generic method to detect.
Have a look also to https://stackoverflow.com/a/9788029/279262 for a cross-browser function that detects the screen width.