Script Categories

User Details >>> Screen Details.

Use this script to show visitors several interesting details about their screen - the screen width, screen height, and screen resolution of their browser window!! You might use this script to suggest that your visitors expand their browser to a larger size before accessing your site, etc.

Add the below code to the <body> section of your page:

<script language="javascript" type="text/javascript">      
/* Visit for full source code
and get more free JavaScript, CSS and DHTML scripts! */
<!-- Begin
var screen_width = null;
var screen_height = null;
var resolution = null;
if (navigator.javaEnabled()) {
var toolkit = java.awt.Toolkit.getDefaultToolkit();
var screen_size = toolkit.getScreenSize();
screen_width = screen_size.width;
screen_height = screen_size.height;
resolution = toolkit.getScreenResolution();

if ((screen_width != null)
(screen_height != null)
(resolution != null)) {
document.write('<h1>Monitor Details:</h1><br><hr><br>');
document.write('Screen Width:  '+screen_width+'<BR>');
document.write('Screen Height:  '+screen_height+'<BR>');
document.write('Screen Resolution: '+resolution+'<BR>');
else {
document.write('I am sorry but we could not determine<P>');
document.write('the details of this screen.  You might<P>');
document.write('not have Java enabled in this browser.<P>');
// End -->

JavaScript Editor Get Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.

Code was highlighted by 1st JavaScript Editor (The Best JavaScript Editor!).